Examples of expectedPropertyReceived()


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

        mock.setResultWaitTime(2000);
        mock.expectedMessageCount(3);
        mock.message(0).body().isEqualTo("Message 0");
        mock.message(1).body().isEqualTo("Message 1");
        mock.message(2).body().isEqualTo("Message 2");
        mock.expectedPropertyReceived(Exchange.BATCH_SIZE, 3);

        assertMockEndpointsSatisfied();

        mock.reset();
        mock.expectedMessageCount(2);
View Full Code Here

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

        assertMockEndpointsSatisfied();

        mock.reset();
        mock.expectedMessageCount(2);
        mock.expectedPropertyReceived(Exchange.BATCH_SIZE, 2);
        mock.message(0).body().isEqualTo("Message 3");
        mock.message(1).body().isEqualTo("Message 4");

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

        assertMockEndpointsSatisfied();
    }

    private void prepareMailbox() throws Exception {
View Full Code Here

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

    @Test
    public void testSendExchange() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceived("Hello World");
        mock.expectedHeaderReceived("foo", "cheese");
        mock.expectedPropertyReceived("bar", 123);

        template.send("direct:start", new Processor() {
            public void process(Exchange exchange) throws Exception {
                exchange.getIn().setBody("Hello World");
                exchange.getIn().setHeader("foo", "cheese");
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()

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

        assertMockEndpointsSatisfied();

        mock.reset();
        mock.expectedMessageCount(1);
View Full Code Here

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

        assertMockEndpointsSatisfied();

        mock.reset();
        mock.expectedMessageCount(1);
        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()

    public void testMaxMessagesPerPoll() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceived("AAA", "BBB");
        mock.setResultWaitTime(4000);
        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()

        ctx.start();

        String addressLine1 = "8506 SIX FORKS ROAD,";

        MockEndpoint mock = ctx.getEndpoint("mock:result", MockEndpoint.class);
        mock.expectedPropertyReceived("addressLine1", addressLine1);

        String csvLine = "\"PROBLEM SOLVER\",\"" + addressLine1
                         + "\",\"SUITE 104\",\"RALEIGH\",\"NC\",\"27615\",\"US\"";
        ProducerTemplate template = ctx.createProducerTemplate();
        template.sendBody("direct:fromCsv", csvLine.trim());
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.