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 Details

    • advanced

    • assertPeriod

      default MockEndpointBuilderFactory.MockEndpointBuilder assertPeriod(long 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: long type. Group: producer
      Parameters:
      assertPeriod - the value to set
      Returns:
      the dsl builder
    • assertPeriod

      default MockEndpointBuilderFactory.MockEndpointBuilder assertPeriod(String 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 a long type. Group: producer
      Parameters:
      assertPeriod - the value to set
      Returns:
      the dsl builder
    • expectedCount

      default MockEndpointBuilderFactory.MockEndpointBuilder expectedCount(int 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: int type. Default: -1 Group: producer
      Parameters:
      expectedCount - the value to set
      Returns:
      the dsl builder
    • expectedCount

      default MockEndpointBuilderFactory.MockEndpointBuilder expectedCount(String 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 a int type. Default: -1 Group: producer
      Parameters:
      expectedCount - the value to set
      Returns:
      the dsl builder