Examples of expectsAscending()


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

    }

    public void testStartStopConsumer() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(20);
        mock.expectsAscending(body());

        initRoute();
        // will send messages to the queue in another thread simulation a producer
        sendMessagesToQueue();
View Full Code Here

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

    }

    public void testStartStopConsumer() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(20);
        mock.expectsAscending(body());

        initRoute();
        // will send messages to the queue in another thread simulation a producer
        sendMessagesToQueue();
View Full Code Here

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

public class MulticastParallelStressTest extends ContextTestSupport {

    public void testTwoMulticast() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceived("ABCD", "ABCD");
        mock.expectsAscending().header("id");

        template.sendBodyAndHeader("direct:start", "", "id", 1);
        template.sendBodyAndHeader("direct:start", "", "id", 2);

        assertMockEndpointsSatisfied();
View Full Code Here

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

    }

    public void testMoreMulticast() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(20);
        mock.expectsAscending().header("id");

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

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

    }

    public void testStartStopConsumer() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(10);
        mock.expectsAscending(body());

        initRoute();
        // will send messages to the queue in another thread simulation a producer
        sendMessagesToQueue();
View Full Code Here

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

public class JmsTimerBasedPollingConsumerTest extends CamelTestSupport {

    @Test
    public void testJmsTimerBasedPollingConsumer() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectsAscending(header("number"));
        mock.expectedMessageCount(10);

        for (int i = 0; i < 10; i++) {
            template.sendBody("activemq:queue.inbox", "World");
        }
View Full Code Here

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

        Mailbox mailbox = Mailbox.get("jones@localhost");
        assertEquals(5, mailbox.size());

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(5);
        mock.expectsAscending(body());
        mock.message(0).property(Exchange.BATCH_INDEX).isEqualTo(0);
        mock.message(1).property(Exchange.BATCH_INDEX).isEqualTo(1);
        mock.message(2).property(Exchange.BATCH_INDEX).isEqualTo(2);
        mock.message(3).property(Exchange.BATCH_INDEX).isEqualTo(3);
        mock.message(4).property(Exchange.BATCH_INDEX).isEqualTo(4);
View Full Code Here

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

public class RssEntrySortTest extends CamelTestSupport {

    @Test
    public void testSortedEntries() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:sorted");
        mock.expectsAscending(ExpressionBuilder.beanExpression("myBean", "getPubDate"));
        mock.expectedMessageCount(10);
        mock.setResultWaitTime(15000L);
        mock.assertIsSatisfied();
    }
View Full Code Here

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

    }

    @Test
    public void testUnSortedEntries() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:unsorted");
        mock.expectsAscending(ExpressionBuilder.beanExpression("myBean", "getPubDate"));
        mock.expectedMessageCount(10);
        mock.setResultWaitTime(2000L);
        mock.assertIsNotSatisfied(2000L);
    }   
   
View Full Code Here

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

        Mailbox mailbox = Mailbox.get("jones@localhost");
        assertEquals(5, mailbox.size());

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(5);
        mock.expectsAscending(body());
        mock.message(0).property(Exchange.BATCH_INDEX).isEqualTo(0);
        mock.message(1).property(Exchange.BATCH_INDEX).isEqualTo(1);
        mock.message(2).property(Exchange.BATCH_INDEX).isEqualTo(2);
        mock.message(3).property(Exchange.BATCH_INDEX).isEqualTo(3);
        mock.message(4).property(Exchange.BATCH_INDEX).isEqualTo(4);
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.