Interface DataSetTestEndpointBuilderFactory.DataSetTestEndpointBuilder

  • All Superinterfaces:
    org.apache.camel.builder.EndpointProducerBuilder, org.apache.camel.EndpointProducerResolver
    Enclosing interface:
    DataSetTestEndpointBuilderFactory

    public static interface DataSetTestEndpointBuilderFactory.DataSetTestEndpointBuilder
    extends org.apache.camel.builder.EndpointProducerBuilder
    Builder for endpoint for the DataSet Test component.
    • Method Detail

      • assertPeriod

        default DataSetTestEndpointBuilderFactory.DataSetTestEndpointBuilder assertPeriod​(long assertPeriod)
        Sets a grace period after which the mock endpoint will re-assert to ensure the preliminary assertion is still valid. This is used for example to assert that exactly a number of messages arrives. For example if expectedMessageCount(int) was set to 5, then the assertion is satisfied when 5 or more message arrives. To ensure that exactly 5 messages arrives, 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. Default: 0 Group: producer
      • assertPeriod

        default DataSetTestEndpointBuilderFactory.DataSetTestEndpointBuilder assertPeriod​(String assertPeriod)
        Sets a grace period after which the mock endpoint will re-assert to ensure the preliminary assertion is still valid. This is used for example to assert that exactly a number of messages arrives. For example if expectedMessageCount(int) was set to 5, then the assertion is satisfied when 5 or more message arrives. To ensure that exactly 5 messages arrives, 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. Default: 0 Group: producer
      • expectedCount

        default DataSetTestEndpointBuilderFactory.DataSetTestEndpointBuilder expectedCount​(int expectedCount)
        Specifies the expected number of message exchanges that should be received by this endpoint. 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 setAssertPeriod(long). An alternative is to use NotifyBuilder, and use the notifier to know when Camel is done routing some messages, before you call the assertIsSatisfied() method on the mocks. This allows you to not use a fixed assert period, to speedup testing times. If you want to assert that exactly n'th message arrives to this mock endpoint, then see also the setAssertPeriod(long) method for further details. The option is a: int type. Default: -1 Group: producer
      • expectedCount

        default DataSetTestEndpointBuilderFactory.DataSetTestEndpointBuilder expectedCount​(String expectedCount)
        Specifies the expected number of message exchanges that should be received by this endpoint. 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 setAssertPeriod(long). An alternative is to use NotifyBuilder, and use the notifier to know when Camel is done routing some messages, before you call the assertIsSatisfied() method on the mocks. This allows you to not use a fixed assert period, to speedup testing times. If you want to assert that exactly n'th message arrives to this mock endpoint, then see also the setAssertPeriod(long) method for further details. The option will be converted to a int type. Default: -1 Group: producer
      • failFast

        default DataSetTestEndpointBuilderFactory.DataSetTestEndpointBuilder failFast​(boolean failFast)
        Sets whether assertIsSatisfied() should fail fast at the first detected failed expectation while it may otherwise wait for all expected messages to arrive before performing expectations verifications. Is by default true. Set to false to use behavior as in Camel 2.x. The option is a: boolean type. Default: false Group: producer
      • failFast

        default DataSetTestEndpointBuilderFactory.DataSetTestEndpointBuilder failFast​(String failFast)
        Sets whether assertIsSatisfied() should fail fast at the first detected failed expectation while it may otherwise wait for all expected messages to arrive before performing expectations verifications. Is by default true. Set to false to use behavior as in Camel 2.x. The option will be converted to a boolean type. Default: false Group: producer
      • lazyStartProducer

        default DataSetTestEndpointBuilderFactory.DataSetTestEndpointBuilder lazyStartProducer​(boolean lazyStartProducer)
        Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. The option is a: boolean type. Default: false Group: producer
      • lazyStartProducer

        default DataSetTestEndpointBuilderFactory.DataSetTestEndpointBuilder lazyStartProducer​(String lazyStartProducer)
        Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. The option will be converted to a boolean type. Default: false Group: producer
      • resultMinimumWaitTime

        default DataSetTestEndpointBuilderFactory.DataSetTestEndpointBuilder resultMinimumWaitTime​(long resultMinimumWaitTime)
        Sets the minimum expected amount of time (in millis) the assertIsSatisfied() will wait on a latch until it is satisfied. The option is a: long type. Default: 0 Group: producer
      • resultMinimumWaitTime

        default DataSetTestEndpointBuilderFactory.DataSetTestEndpointBuilder resultMinimumWaitTime​(String resultMinimumWaitTime)
        Sets the minimum expected amount of time (in millis) the assertIsSatisfied() will wait on a latch until it is satisfied. The option will be converted to a long type. Default: 0 Group: producer
      • retainFirst

        default DataSetTestEndpointBuilderFactory.DataSetTestEndpointBuilder retainFirst​(int retainFirst)
        Specifies to only retain the first n'th number of received Exchanges. This is used when testing with big data, to reduce memory consumption by not storing copies of every Exchange this mock endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still return the actual number of received Exchanges. For example if we have received 5000 Exchanges, and have configured to only retain the first 10 Exchanges, then the getReceivedCounter() will still return 5000 but there is only the first 10 Exchanges in the getExchanges() and getReceivedExchanges() methods. When using this method, then some of the other expectation methods is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the first number of bodies received. You can configure both setRetainFirst(int) and setRetainLast(int) methods, to limit both the first and last received. The option is a: int type. Default: -1 Group: producer
      • retainFirst

        default DataSetTestEndpointBuilderFactory.DataSetTestEndpointBuilder retainFirst​(String retainFirst)
        Specifies to only retain the first n'th number of received Exchanges. This is used when testing with big data, to reduce memory consumption by not storing copies of every Exchange this mock endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still return the actual number of received Exchanges. For example if we have received 5000 Exchanges, and have configured to only retain the first 10 Exchanges, then the getReceivedCounter() will still return 5000 but there is only the first 10 Exchanges in the getExchanges() and getReceivedExchanges() methods. When using this method, then some of the other expectation methods is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the first number of bodies received. You can configure both setRetainFirst(int) and setRetainLast(int) methods, to limit both the first and last received. The option will be converted to a int type. Default: -1 Group: producer
      • retainLast

        default DataSetTestEndpointBuilderFactory.DataSetTestEndpointBuilder retainLast​(int retainLast)
        Specifies to only retain the last n'th number of received Exchanges. This is used when testing with big data, to reduce memory consumption by not storing copies of every Exchange this mock endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still return the actual number of received Exchanges. For example if we have received 5000 Exchanges, and have configured to only retain the last 20 Exchanges, then the getReceivedCounter() will still return 5000 but there is only the last 20 Exchanges in the getExchanges() and getReceivedExchanges() methods. When using this method, then some of the other expectation methods is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the first number of bodies received. You can configure both setRetainFirst(int) and setRetainLast(int) methods, to limit both the first and last received. The option is a: int type. Default: -1 Group: producer
      • retainLast

        default DataSetTestEndpointBuilderFactory.DataSetTestEndpointBuilder retainLast​(String retainLast)
        Specifies to only retain the last n'th number of received Exchanges. This is used when testing with big data, to reduce memory consumption by not storing copies of every Exchange this mock endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still return the actual number of received Exchanges. For example if we have received 5000 Exchanges, and have configured to only retain the last 20 Exchanges, then the getReceivedCounter() will still return 5000 but there is only the last 20 Exchanges in the getExchanges() and getReceivedExchanges() methods. When using this method, then some of the other expectation methods is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the first number of bodies received. You can configure both setRetainFirst(int) and setRetainLast(int) methods, to limit both the first and last received. The option will be converted to a int type. Default: -1 Group: producer
      • sleepForEmptyTest

        default DataSetTestEndpointBuilderFactory.DataSetTestEndpointBuilder sleepForEmptyTest​(long sleepForEmptyTest)
        Allows a sleep to be specified to wait to check that this endpoint really is empty when expectedMessageCount(int) is called with zero. The option is a: long type. Default: 0 Group: producer
      • sleepForEmptyTest

        default DataSetTestEndpointBuilderFactory.DataSetTestEndpointBuilder sleepForEmptyTest​(String sleepForEmptyTest)
        Allows a sleep to be specified to wait to check that this endpoint really is empty when expectedMessageCount(int) is called with zero. The option will be converted to a long type. Default: 0 Group: producer
      • split

        default DataSetTestEndpointBuilderFactory.DataSetTestEndpointBuilder split​(boolean split)
        If enabled the messages loaded from the test endpoint will be split using new line delimiters so each line is an expected message. For example to use a file endpoint to load a file where each line is an expected message. The option is a: boolean type. Default: false Group: producer
      • split

        default DataSetTestEndpointBuilderFactory.DataSetTestEndpointBuilder split​(String split)
        If enabled the messages loaded from the test endpoint will be split using new line delimiters so each line is an expected message. For example to use a file endpoint to load a file where each line is an expected message. The option will be converted to a boolean type. Default: false Group: producer