Examples of expectedBodyReceived()


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

public class MvelTest extends OSGiIntegrationTestSupport {
   
    @Test
    public void testMvelLanguage() throws Exception {
        MockEndpoint result = getMockEndpoint("mock:result");
        result.expectedBodyReceived();
       
        template.sendBody("direct:testmvel", new MyFooBean());
      
    }
       
View Full Code Here

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

public class ExpressionClauseTest extends ContextTestSupport {

    public void testConstant() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(1);
        mock.expectedBodyReceived().constant("Hello World");

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

        assertMockEndpointsSatisfied();
    }
View Full Code Here

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

        mock.expectedMessageCount(1);

        Partial partial = new Partial();
        partial.setName("mock");
        partial.setLocation("org.apache.camel");
        mock.expectedBodyReceived().constant(partial);

        String xml = "<Partial name=\"mock\"><location>org.apache.camel</location></Partial>";
        template.sendBody("direct:unmarshal", xml);

        mock.assertIsSatisfied();
View Full Code Here

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

        mock.expectedMessageCount(1);

        Partial partial = new Partial();
        partial.setName("mock");
        partial.setLocation("org.apache.camel");
        mock.expectedBodyReceived().constant(partial);

        String xml = "<Partial name=\"mock\"><location>org.apache.camel</location></Partial>";
        template.sendBody("direct:unmarshal", xml);

        mock.assertIsSatisfied();
View Full Code Here

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

public class ExpressionClauseTest extends ContextTestSupport {

    public void testConstant() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(1);
        mock.expectedBodyReceived().constant("Hello World");

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

        assertMockEndpointsSatisfied();
    }
View Full Code Here

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

        mock.expectedMessageCount(1);

        Partial partial = new Partial();
        partial.setName("mock");
        partial.setLocation("org.apache.camel");
        mock.expectedBodyReceived().constant(partial);

        String xml = "<Partial name=\"mock\"><location>org.apache.camel</location></Partial>";
        template.sendBody("direct:unmarshal", xml);

        mock.assertIsSatisfied();
View Full Code Here

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

        Mailbox mailboxRaw = Mailbox.get("jonesRaw" + type + "@localhost");
        assertEquals(1, mailboxRaw.size());

        MockEndpoint mock = getMockEndpoint("mock://rawMessage" + type);
        mock.expectedMessageCount(1);
        mock.expectedBodyReceived().body().isNotNull();
        assertMockEndpointsSatisfied();

        Message mailMessage = mock.getExchanges().get(0).getIn().getBody(Message.class);
        assertNotNull("mail subject should not be null", mailMessage.getSubject());
        assertEquals("mail subject should be hurz", "hurz", mailMessage.getSubject());
View Full Code Here

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

        Mailbox mailbox = Mailbox.get("jones" + type + "@localhost");
        assertEquals(1, mailbox.size());

        MockEndpoint mock = getMockEndpoint("mock://normalMessage" + type);
        mock.expectedMessageCount(1);
        mock.expectedBodyReceived().body().isNotNull();
        assertMockEndpointsSatisfied();

        String body = mock.getExchanges().get(0).getIn().getBody(String.class);
        MimeMessage mm = new MimeMessage(null, new ByteArrayInputStream(body.getBytes()));
        String subject = mm.getSubject();
View Full Code Here

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

public class ExpressionClauseTest extends ContextTestSupport {

    public void testConstant() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(1);
        mock.expectedBodyReceived().constant("Hello World");

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

        assertMockEndpointsSatisfied();
    }
View Full Code Here

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

public class ExpressionClauseTest extends ContextTestSupport {

    public void testConstant() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(1);
        mock.expectedBodyReceived().constant("Hello World");

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

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