Examples of expectedFileExists()


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

    public void testMoveToSubDir() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(3);
        // will flatten when using absolute path in move
        mock.expectedFileExists(base + "/.done/bye.txt");
        mock.expectedFileExists(base + "/.done/hello.txt");
        mock.expectedFileExists(base + "/.done/goodday.txt");

        assertMockEndpointsSatisfied();
    }
View Full Code Here

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

    public void testMoveToSubDir() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(3);
        // will flatten when using absolute path in move
        mock.expectedFileExists(base + "/.done/bye.txt");
        mock.expectedFileExists(base + "/.done/hello.txt");
        mock.expectedFileExists(base + "/.done/goodday.txt");

        assertMockEndpointsSatisfied();
    }
View Full Code Here

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

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(3);
        // will flatten when using absolute path in move
        mock.expectedFileExists(base + "/.done/bye.txt");
        mock.expectedFileExists(base + "/.done/hello.txt");
        mock.expectedFileExists(base + "/.done/goodday.txt");

        assertMockEndpointsSatisfied();
    }

    @Override
View Full Code Here

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

    public void testMoveToSubDir() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(3);
        // will flatten when using absolute path in move
        mock.expectedFileExists(base + "/.done/bye.txt");
        mock.expectedFileExists(base + "/.done/hello.txt");
        mock.expectedFileExists(base + "/.done/goodday.txt");

        assertMockEndpointsSatisfied();
    }
View Full Code Here

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

    public void testMoveToSubDir() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(3);
        // will flatten when using absolute path in move
        mock.expectedFileExists(base + "/.done/bye.txt");
        mock.expectedFileExists(base + "/.done/hello.txt");
        mock.expectedFileExists(base + "/.done/goodday.txt");

        assertMockEndpointsSatisfied();
    }
View Full Code Here

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

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(3);
        // will flatten when using absolute path in move
        mock.expectedFileExists(base + "/.done/bye.txt");
        mock.expectedFileExists(base + "/.done/hello.txt");
        mock.expectedFileExists(base + "/.done/goodday.txt");

        assertMockEndpointsSatisfied();
    }

    @Override
View Full Code Here

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

    }

    public void testIgnore() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceived("Hello World");
        mock.expectedFileExists("target/file/hello.txt", "Hello World");

        template.sendBodyAndHeader("file://target/file?fileExist=Ignore", "Bye World", Exchange.FILE_NAME, "hello.txt");

        assertMockEndpointsSatisfied();
    }
View Full Code Here

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

        });
        context.start();

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(1);
        mock.expectedFileExists("./target/keep/out/hello.txt");
        mock.message(0).header(Exchange.FILE_LAST_MODIFIED).isNotNull();

        assertMockEndpointsSatisfied();

        long t1 = mock.getReceivedExchanges().get(0).getIn().getHeader(Exchange.FILE_LAST_MODIFIED, Date.class).getTime();
View Full Code Here

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

        });
        context.start();

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(1);
        mock.expectedFileExists("./target/keep/out/hello.txt");
        mock.message(0).header(Exchange.FILE_LAST_MODIFIED).isNotNull();

        assertMockEndpointsSatisfied();

        long t1 = mock.getReceivedExchanges().get(0).getIn().getHeader(Exchange.FILE_LAST_MODIFIED, Date.class).getTime();
View Full Code Here

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

    public void testSplitPropertiesFileAndRoute() throws Exception {
        MockEndpoint foo = getMockEndpoint("mock:foo");
        foo.expectedBodiesReceived("[foo=1, foo=4]");

        // after the file is routed it should be moved to done
        foo.expectedFileExists("target/file/splitprop/done/myprop.txt", body);

        MockEndpoint bar = getMockEndpoint("mock:bar");
        bar.expectedBodiesReceived("[bar=2, bar=3]");

        template.sendBodyAndHeader("file://target/file/splitprop", body, Exchange.FILE_NAME, "myprop.txt");
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.