Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Where someName can be any string to uniquely identify the endpoint

Examples

Here's quick example of MockEndpoint in use

Code Block

MockEndpoint resultEndpoint = context.resolveEndpoint("mock:foo");

resultEndpoint.expectedMessageCount(1);

// send some messages
...

// now lets assert that the mock:foo endpoint received a message
resultEndpoint.assertIsSatisfied();

You can see from the javadoc of MockEndpoint the various helper methods you can use.

There are some examples of the Mock endpoint in use in the camel-corecore processor tests.