Examples of expectsNoDuplicates()


Examples of org.apache.camel.component.mock.MockEndpoint.expectsNoDuplicates()

    }

    public void testXPathSplitStream() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:splitted");
        mock.expectedMessageCount(size);
        mock.expectsNoDuplicates().body();

        assertMockEndpointsSatisfied();
    }

    @Override
View Full Code Here

Examples of org.apache.camel.component.mock.MockEndpoint.expectsNoDuplicates()

                }
            });
        }

        mock.assertIsSatisfied();
        mock.expectsNoDuplicates(body());
    }

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            public void configure() throws Exception {
View Full Code Here

Examples of org.apache.camel.component.mock.MockEndpoint.expectsNoDuplicates()

public class BeanConcurrentTest extends ContextTestSupport {

    public void testBeanConcurrent() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(1000);
        mock.expectsNoDuplicates(body());

        // start from 1000 to be 4 digit always (easier to string compare)
        for (int i = 1000; i < 2000; i++) {
            template.sendBody("seda:foo", "" + i);
        }
View Full Code Here

Examples of org.apache.camel.component.mock.MockEndpoint.expectsNoDuplicates()

    public void testSplitWithCustomAggregatorStrategy() throws Exception {
        int files = 10;
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(files);
        // no duplicates should be received
        mock.expectsNoDuplicates(body());

        for (int i = 0; i < files; i++) {
            template.sendBody("direct:start", "");
        }
View Full Code Here

Examples of org.apache.camel.component.mock.MockEndpoint.expectsNoDuplicates()

                }
            });
        }

        mock.assertIsSatisfied();
        mock.expectsNoDuplicates(body());
        executor.shutdown();
    }

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
View Full Code Here

Examples of org.apache.camel.component.mock.MockEndpoint.expectsNoDuplicates()

    }

    public void testXPathSplitStream() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:splitted");
        mock.expectedMessageCount(size);
        mock.expectsNoDuplicates().body();

        assertMockEndpointsSatisfied();
    }

    @Override
View Full Code Here

Examples of org.apache.camel.component.mock.MockEndpoint.expectsNoDuplicates()

                }
            });
        }

        mock.assertIsSatisfied();
        mock.expectsNoDuplicates(body());
    }

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            public void configure() throws Exception {
View Full Code Here

Examples of org.apache.camel.component.mock.MockEndpoint.expectsNoDuplicates()

    }

    public void testSendingAMessageUsingMulticastReceivesItsOwnExchangeParallel() throws Exception {
        MockEndpoint resultEndpoint = getMockEndpoint("mock:result");

        resultEndpoint.expectsNoDuplicates(body());
        resultEndpoint.expectedMessageCount(4);

        // InOnly
        template.send("direct:parallel", new Processor() {
            public void process(Exchange exchange) {
View Full Code Here

Examples of org.apache.camel.component.mock.MockEndpoint.expectsNoDuplicates()

    public void testConcurrencyParallelMulticast() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(20);
        // this time we cannot expect in order but there should be no duplicates
        mock.expectsNoDuplicates(header("id"));

        ExecutorService executor = Executors.newFixedThreadPool(10);
        for (int i = 0; i < 20; i++) {
            final int index = i;
            executor.submit(new Callable<Object>() {
View Full Code Here

Examples of org.apache.camel.component.mock.MockEndpoint.expectsNoDuplicates()

public class AggregateMultipleSourceTest extends ContextTestSupport {

    public void testAggregateMultipleSourceTest() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(2);
        mock.expectsNoDuplicates(body());
        mock.setResultWaitTime(20000);

        for (int i = 0; i < 40; i++) {
            if (i % 2 == 0) {
                template.sendBodyAndHeader("seda:foo", "" + i, "type", "A");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.