Examples of expectedBodiesReceivedInAnyOrder()


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

        assertEquals(true, notify.matches());
    }

    public void testComplexOrCamel() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:assert");
        mock.expectedBodiesReceivedInAnyOrder("Hello World", "Bye World", "Hi World");

        NotifyBuilder notify = new NotifyBuilder(context)
                .from("direct:foo").whenReceivedSatisfied(mock)
                .and().from("direct:bar").whenExactlyDone(5).whenAnyReceivedMatches(body().contains("Camel"))
                .create();
View Full Code Here

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

        template.sendBodyAndHeader(fileUrl, "Godday World", Exchange.FILE_NAME, "sub/sub2/godday.txt");
    }

    public void testMultiDir() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceivedInAnyOrder("Bye World", "Hello World", "Godday World");

        mock.expectedFileExists("target/multidir/.done/bye.txt.old");
        mock.expectedFileExists("target/multidir/.done/sub/hello.txt.old");
        mock.expectedFileExists("target/multidir/.done/sub/sub2/godday.txt.old");
View Full Code Here

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

public class NettyInOutFromSedaTest extends CamelTestSupport {

    @Test
    public void testInOutIssue() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceivedInAnyOrder("Bye A", "Bye B", "Bye C");

        template.sendBody("seda:start", "A");
        template.sendBody("seda:start", "B");
        template.sendBody("seda:start", "C");
View Full Code Here

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

    }

    @Test
    public void testPollFileAndShouldBeMoved() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceivedInAnyOrder("Hello", "Bye", "Goodday");
        mock.expectedFileExists(FTP_ROOT_DIR + "movefile/.done/hello.txt.old");
        mock.expectedFileExists(FTP_ROOT_DIR + "movefile/.done/bye/bye.txt.old");
        mock.expectedFileExists(FTP_ROOT_DIR + "movefile/.done/goodday/goodday.txt.old");

        mock.assertIsSatisfied();
View Full Code Here

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

    }

    @Test
    public void testPollFileAndShouldBeMoved() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceivedInAnyOrder("Hello", "Bye", "Goodday");
        mock.expectedFileExists(FTP_ROOT_DIR + ".done/hello.txt");
        mock.expectedFileExists(FTP_ROOT_DIR + ".done/sub/bye.txt");
        mock.expectedFileExists(FTP_ROOT_DIR + ".done/sub/sub2/goodday.txt");

        mock.assertIsSatisfied();
View Full Code Here

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

        String before = context.getExecutorServiceStrategy().getThreadName("foo");

        for (int i = 0; i < 10; i++) {
            MockEndpoint mock = getMockEndpoint("mock:result");
            mock.reset();
            mock.expectedBodiesReceivedInAnyOrder("c", "b", "a");

            template.sendBodyAndHeader("direct:start", "Hello World", "foo", "direct:a,direct:b,direct:c");

            assertMockEndpointsSatisfied();
        }
View Full Code Here

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

        service.shutdownNow();
    }

    public void testSplitParallelStopOnExceptionOk() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:split");
        mock.expectedBodiesReceivedInAnyOrder("Hello World", "Bye World");

        template.sendBody("direct:start", "Hello World,Bye World");

        assertMockEndpointsSatisfied();
    }
View Full Code Here

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

    }

    @Test
    public void testPollFileAndShouldBeMoved() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceivedInAnyOrder("Hello", "Bye", "Goodday");
        mock.expectedFileExists(FTP_ROOT_DIR + "movefile/.done/hello.txt");
        mock.expectedFileExists(FTP_ROOT_DIR + "movefile/.done/bye.txt");
        mock.expectedFileExists(FTP_ROOT_DIR + "movefile/.done/goodday.txt");

        mock.assertIsSatisfied();
View Full Code Here

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

        deleteDirectory("./target/includeexclude");
        prepareFiles();

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(2);
        mock.expectedBodiesReceivedInAnyOrder("Report 2", "Report 3");
        mock.assertIsSatisfied();
    }

    private void prepareFiles() throws Exception {
        String url = "file://target/includeexclude";
View Full Code Here

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

    }

    @Test
    public void testPollFileAndShouldBeMoved() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceivedInAnyOrder("Hello", "Bye", "Goodday");
        mock.expectedFileExists(FTP_ROOT_DIR + "movefile/.done/hello.txt");
        mock.expectedFileExists(FTP_ROOT_DIR + "movefile/sub/.done/bye.txt");
        mock.expectedFileExists(FTP_ROOT_DIR + "movefile/sub/sub2/.done/goodday.txt");

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