Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: CAMEL-656

...

URI format

Code Block
mock:someName?options

Where someName can be any string to uniquely identify the endpoint

Options

Option

Default

Description

reportGroup

null

A size to use a throughput logger for reporting

Simple Example

Here's a simple example of MockEndpoint in use. First the endpoint is resolved on the context. Then we set an expectation, then after the test has run we assert our expectations are met.

...

You typically always call the assertIsSatisfied() method to test that the expectations were met after running a test.

Camel will by default wait 20 seconds when the assertIsSatisfied() is invoked. This can be configured by setting the setResultWaitTime(millis) method.

Setting expectations

You can see from the javadoc of MockEndpoint the various helper methods you can use to set expectations. The main methods available are as follows:

...