Interface MockEndpointBuilderFactory.MockEndpointBuilder
- All Superinterfaces:
org.apache.camel.builder.EndpointProducerBuilder,org.apache.camel.EndpointProducerResolver
- Enclosing interface:
MockEndpointBuilderFactory
public static interface MockEndpointBuilderFactory.MockEndpointBuilder
extends org.apache.camel.builder.EndpointProducerBuilder
Builder for endpoint for the Mock component.
-
Method Summary
Modifier and TypeMethodDescriptionadvanced()assertPeriod(long assertPeriod) Sets a grace period after which the mock will re-assert to ensure the preliminary assertion is still valid.assertPeriod(String assertPeriod) Sets a grace period after which the mock will re-assert to ensure the preliminary assertion is still valid.expectedCount(int expectedCount) Specifies the expected number of message exchanges that should be received by this mock.expectedCount(String expectedCount) Specifies the expected number of message exchanges that should be received by this mock.Methods inherited from interface org.apache.camel.builder.EndpointProducerBuilder
doSetMultiValueProperties, doSetMultiValueProperty, doSetProperty, expr, getRawUriMethods inherited from interface org.apache.camel.EndpointProducerResolver
resolve, resolve
-
Method Details
-
advanced
-
assertPeriod
Sets a grace period after which the mock will re-assert to ensure the preliminary assertion is still valid. This is used, for example, to assert that exactly a number of messages arrive. For example, if the expected count was set to 5, then the assertion is satisfied when five or more messages arrive. To ensure that exactly 5 messages arrive, then you would need to wait a little period to ensure no further message arrives. This is what you can use this method for. By default, this period is disabled. The option is a:longtype. Group: producer- Parameters:
assertPeriod- the value to set- Returns:
- the dsl builder
-
assertPeriod
Sets a grace period after which the mock will re-assert to ensure the preliminary assertion is still valid. This is used, for example, to assert that exactly a number of messages arrive. For example, if the expected count was set to 5, then the assertion is satisfied when five or more messages arrive. To ensure that exactly 5 messages arrive, then you would need to wait a little period to ensure no further message arrives. This is what you can use this method for. By default, this period is disabled. The option will be converted to alongtype. Group: producer- Parameters:
assertPeriod- the value to set- Returns:
- the dsl builder
-
expectedCount
Specifies the expected number of message exchanges that should be received by this mock. Beware: If you want to expect that 0 messages, then take extra care, as 0 matches when the tests starts, so you need to set a assert period time to let the test run for a while to make sure there are still no messages arrived; for that use the assertPeriod option. If you want to assert that exactly nth message arrives to this mock, then see also the assertPeriod option for further details. The option is a:inttype. Default: -1 Group: producer- Parameters:
expectedCount- the value to set- Returns:
- the dsl builder
-
expectedCount
Specifies the expected number of message exchanges that should be received by this mock. Beware: If you want to expect that 0 messages, then take extra care, as 0 matches when the tests starts, so you need to set a assert period time to let the test run for a while to make sure there are still no messages arrived; for that use the assertPeriod option. If you want to assert that exactly nth message arrives to this mock, then see also the assertPeriod option for further details. The option will be converted to ainttype. Default: -1 Group: producer- Parameters:
expectedCount- the value to set- Returns:
- the dsl builder
-