Examples of expectedPropertyReceived()


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

    }

    private void doTestAggregateProcessorCompletionTimeout(boolean eager) throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceived("A+B+C");
        mock.expectedPropertyReceived(Exchange.AGGREGATED_COMPLETED_BY, "timeout");

        Processor done = new SendProcessor(context.getEndpoint("mock:result"));
        Expression corr = header("id");
        AggregationStrategy as = new BodyInAggregatingStrategy();
View Full Code Here

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

        // camel context must be started
        context.start();

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceived("A+B+C", "D");
        mock.expectedPropertyReceived(Exchange.AGGREGATED_COMPLETED_BY, "interval");

        Processor done = new SendProcessor(context.getEndpoint("mock:result"));
        Expression corr = header("id");
        AggregationStrategy as = new BodyInAggregatingStrategy();
View Full Code Here

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

    }

    public void testAggregateUseBatchSizeFromConsumer() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceived("A+B", "C+D+E");
        mock.expectedPropertyReceived(Exchange.AGGREGATED_COMPLETED_BY, "consumer");

        Processor done = new SendProcessor(context.getEndpoint("mock:result"));
        Expression corr = header("id");
        AggregationStrategy as = new BodyInAggregatingStrategy();
View Full Code Here

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

        // camel context must be started
        context.start();

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceived("B+END", "A+END");
        mock.expectedPropertyReceived(Exchange.AGGREGATED_COMPLETED_BY, "forceCompletion");

        Processor done = new SendProcessor(context.getEndpoint("mock:result"));
        Expression corr = header("id");
        AggregationStrategy as = new BodyInAggregatingStrategy();
View Full Code Here

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

    public void testMaxMessagesPerPoll() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceived("AAA", "BBB");
        mock.setResultWaitTime(3000);
        mock.expectedPropertyReceived(Exchange.BATCH_SIZE, 2);

        assertMockEndpointsSatisfied();

        mock.reset();
        mock.expectedBodiesReceived("CCC");
View Full Code Here

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

        assertMockEndpointsSatisfied();

        mock.reset();
        mock.expectedBodiesReceived("CCC");
        mock.expectedPropertyReceived(Exchange.BATCH_SIZE, 1);

        assertMockEndpointsSatisfied();
    }

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

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

        mock.message(1).property(Exchange.BATCH_COMPLETE).isEqualTo(false);
        mock.message(2).property(Exchange.BATCH_COMPLETE).isEqualTo(false);
        mock.message(3).property(Exchange.BATCH_COMPLETE).isEqualTo(false);
        mock.message(3).property(Exchange.BATCH_COMPLETE).isEqualTo(false);
        mock.message(4).property(Exchange.BATCH_COMPLETE).isEqualTo(true);
        mock.expectedPropertyReceived(Exchange.BATCH_SIZE, 5);
    }

    @Override
    protected CamelContext createCamelContext() throws Exception {
View Full Code Here

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

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(1);
        mock.expectedBodiesReceived(total);
        mock.expectedHeaderReceived("total", total);
        mock.expectedPropertyReceived(Exchange.AGGREGATED_SIZE, size);

        // submit all tasks
        service.invokeAll(tasks);

        assertMockEndpointsSatisfied();
View Full Code Here

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

        mock.expectedMessageCount(2);
        mock.message(0).property(Exchange.BATCH_INDEX).isEqualTo(0);
        mock.message(0).property(Exchange.BATCH_COMPLETE).isEqualTo(false);
        mock.message(1).property(Exchange.BATCH_INDEX).isEqualTo(1);
        mock.message(1).property(Exchange.BATCH_COMPLETE).isEqualTo(true);
        mock.expectedPropertyReceived(Exchange.BATCH_SIZE, 2);

        assertMockEndpointsSatisfied();
    }

    @Override
View Full Code Here

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

        context.startRoute("foo");

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceived("Bye World", "Godday World");
        mock.setResultWaitTime(4000);
        mock.expectedPropertyReceived(Exchange.BATCH_SIZE, 2);

        assertMockEndpointsSatisfied();

        mock.reset();
        mock.expectedBodiesReceived("Hello World");
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.