Examples of expectsNoDuplicates()


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);

        template.send("direct:parallel", new Processor() {
            public void process(Exchange exchange) {
                Message in = exchange.getIn();
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()

                }
            });
        }

        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 BeanExpressionConcurrentTest 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 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 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()

        template.sendBodyAndHeader("file:target/concurrent", sb.toString(), Exchange.FILE_NAME, "input.txt");

        // start route
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(size);
        mock.expectsNoDuplicates(body());
        mock.setResultWaitTime(30000);

        context.startRoute("foo");

        assertMockEndpointsSatisfied();
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 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 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
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.