Examples of assertIsNotSatisfied()


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

        resultEndpoint.expectedHeaderReceived("header2", "value2");
        resultEndpoint.expectedHeaderReceived("header1", "value1");

        template.sendBody("direct:test", null);

        resultEndpoint.assertIsNotSatisfied();
    }

    public void testHeadersAdded() throws Exception {
        MockEndpoint resultEndpoint = getMockEndpoint("mock:result");
        resultEndpoint.message(0).header("header1").isNull();
View Full Code Here

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

        result.expectedBodiesReceived(body);

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

        // should NOT be okay as we expected utf-8 but got it in utf-16
        result.assertIsNotSatisfied();
    }

    public void testConvertToStringCharsetFail() throws Exception {

        String body = "Hell\u00F6 W\u00F6rld";
View Full Code Here

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

        result.expectedBodiesReceived(body);

        template.sendBody("direct:charset3", new ByteArrayInputStream(body.getBytes("utf-8")));

        // should NOT be okay as we expected utf-8 but got it in utf-16
        result.assertIsNotSatisfied();
    }

    protected RouteBuilder createRouteBuilder() {
        return new RouteBuilder() {
            public void configure() {
View Full Code Here

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

        result.expectedBodiesReceived(body);

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

        // should NOT be okay as we expected utf-8 but got it in utf-16
        result.assertIsNotSatisfied();
    }

    public void testConvertToStringCharsetFail() throws Exception {

        // does not work on AIX
View Full Code Here

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

        result.expectedBodiesReceived(body);

        template.sendBody("direct:charset3", new ByteArrayInputStream(body.getBytes("utf-8")));

        // should NOT be okay as we expected utf-8 but got it in utf-16
        result.assertIsNotSatisfied();
    }

    protected RouteBuilder createRouteBuilder() {
        return new RouteBuilder() {
            public void configure() {
View Full Code Here

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

                Boolean answer = body.contains("Camel");
                return type.cast(answer);
            }
        });
        template.sendBody("direct:start", "Hello World");
        mock.assertIsNotSatisfied();
    }
}
View Full Code Here

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

        mock.setResultWaitTime(3000);

        template.sendBodyAndHeader("file://target/managed", "Bye World", Exchange.FILE_NAME, "bye.txt");

        // route is stopped so we do not get the file
        mock.assertIsNotSatisfied();

        // prepare mock for starting route
        mock.reset();
        mock.expectedBodiesReceived("Bye World");
View Full Code Here

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

        mock.setResultWaitTime(3000);

        template.sendBodyAndHeader("file://target/managed", "Bye World", Exchange.FILE_NAME, "bye.txt");

        // route is stopped so we do not get the file
        mock.assertIsNotSatisfied();

        // prepare mock for starting route
        mock.reset();
        mock.expectedBodiesReceived("Bye World");
View Full Code Here

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

        mock.setResultWaitTime(3000);

        template.sendBodyAndHeader("file://target/managed", "Bye World", Exchange.FILE_NAME, "bye.txt");

        // route is stopped so we do not get the file
        mock.assertIsNotSatisfied();

        // prepare mock for starting route
        mock.reset();
        mock.expectedBodiesReceived("Bye World");
View Full Code Here

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

    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);
    }   
   
    @Override
    protected Context createJndiContext() throws Exception {
        JndiContext jndi = new JndiContext();
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.