Package org.apache.servicemix.tck

Examples of org.apache.servicemix.tck.MessageList


        QName service = new QName("http://servicemix.org/cheese/", "transformer");

        sendMessages(service, 20);
        assertMessagesReceived(20);

        MessageList messageList1 = assertMessagesReceived("service1", 20);
        MessageList messageList2 = assertMessagesReceived("service2", 20);
        MessageList messageList3 = assertMessagesReceived("service3", 20);

        assertMessageHeader(messageList1, 0, "foo", "hello world!");
        assertMessageHeader(messageList1, 1, "foo", "hello world!");
        assertMessageHeader(messageList1, 19, "foo", "hello world!");
View Full Code Here


        // send a custom xml message
        sendMessages(service, 1, message);
        assertMessagesReceived(1);

        MessageList messageList1 = assertMessagesReceived("service1", 1);
        MessageList messageList2 = assertMessagesReceived("service2", 1);
        MessageList messageList3 = assertMessagesReceived("service3", 1);
        MessageList messageList4 = assertMessagesReceived("service4", 1);
        MessageList messageList5 = assertMessagesReceived("service5", 1);
        MessageList messageList6 = assertMessagesReceived("service6", 1);

        assertMessageHeader(messageList1, 0, "foo", "PPR,CPY,20#,84B,LGL,WE");
        assertMessageHeader(messageList2, 0, "foo", "17.25");
        assertMessageHeader(messageList3, 0, "foo", "EXP8514");
        assertMessageHeader(messageList4, 0, "foo", "10040300");
View Full Code Here

public class SendFromCamelToJbiTest extends JbiTestSupport {
    private ReceiverComponent receiverComponent = new ReceiverComponent();

    public void testCamelInvokingJbi() throws Exception {
        sendExchange("<foo bar='123'/>");
        MessageList list = receiverComponent.getMessageList();

        list.assertMessagesReceived(1);
        List messages = list.getMessages();
        NormalizedMessage message = (NormalizedMessage) messages.get(0);
        assertNotNull("null message!", message);
        log.info("Received: " + message);

        assertEquals("cheese header", 123, message.getProperty("cheese"));
View Full Code Here

public class SendFromCamelToJbiThenRouteToAnotherJbiComponentTest extends JbiTestSupport {
    private ReceiverComponent receiverComponent = new ReceiverComponent();

    public void testCamelInvokingJbi() throws Exception {
        sendExchange("<foo bar='123'/>");
        MessageList list = receiverComponent.getMessageList();

        list.assertMessagesReceived(1);
        List messages = list.getMessages();
        NormalizedMessage message = (NormalizedMessage) messages.get(0);
        assertNotNull("null message!", message);
        log.info("Received: " + message);

        assertEquals("cheese header", 123, message.getProperty("cheese"));
View Full Code Here

        QName service = new QName("http://servicemix.org/cheese/", "transformer");

        sendMessages(service, 20);
        assertMessagesReceived(20);

        MessageList messageList1 = assertMessagesReceived("service1", 20);
        MessageList messageList2 = assertMessagesReceived("service2", 20);
        MessageList messageList3 = assertMessagesReceived("service3", 40);

        assertMessageXPath(messageList1, 0, "/cheese", "Edam");
        assertMessageXPath(messageList1, 1, "/cheese", "Edam");
        assertMessageXPath(messageList1, 19, "/cheese", "Edam");
        assertMessageXPath(messageList1, 0, "/cheese/@id", "1");
View Full Code Here

        QName service = new QName("http://servicemix.org/cheese/", "transformer");

        sendMessages(service, 20);
        assertMessagesReceived(20);

        MessageList messageList1 = assertMessagesReceived("service1", 20);
        MessageList messageList2 = assertMessagesReceived("service2", 20);
        MessageList messageList3 = assertMessagesReceived("service3", 20);

        assertMessageHeader(messageList1, 0, "foo", "hello world!");
        assertMessageHeader(messageList1, 1, "foo", "hello world!");
        assertMessageHeader(messageList1, 19, "foo", "hello world!");
View Full Code Here

        // send a custom xml message
        sendMessages(service, 1, message);
        assertMessagesReceived(1);

        MessageList messageList1 = assertMessagesReceived("service1", 1);
        MessageList messageList2 = assertMessagesReceived("service2", 1);
        MessageList messageList3 = assertMessagesReceived("service3", 1);
        MessageList messageList4 = assertMessagesReceived("service4", 1);
        MessageList messageList5 = assertMessagesReceived("service5", 1);
        MessageList messageList6 = assertMessagesReceived("service6", 1);

        assertMessageHeader(messageList1, 0, "foo", "PPR,CPY,20#,84B,LGL,WE");
        assertMessageHeader(messageList2, 0, "foo", "17.25");
        assertMessageHeader(messageList3, 0, "foo", "EXP8514");
        assertMessageHeader(messageList4, 0, "foo", "10040300");
View Full Code Here

public class ChainedComponentTest extends AbstractSpringTestSupport {

    public void testSendingAndReceivingMessagesUsingSpring() throws Exception {
        super.testSendingAndReceivingMessagesUsingSpring();
        MessageList messageList = getReceivedMessageList();
        for (Iterator iter = messageList.getMessages().iterator(); iter.hasNext();) {
            NormalizedMessage msg = (NormalizedMessage) iter.next();
            assertNotNull(msg.getProperty("prop1"));
            assertNotNull(msg.getProperty("prop2"));
        }
    }
View Full Code Here

        assertNotNull(sender);
        assertNotNull(getReceiver());

        sender.sendMessages(messageCount);

        MessageList messageList = getReceivedMessageList();
        messageList.assertMessagesReceived(messageCount);
    }
View Full Code Here

    public void testSendingAndReceivingMessagesUsingSpring() throws Exception {
        Sender sender = getSender();

        sender.sendMessages(messageCount);

        MessageList messageList = getReceivedMessageList();
        messageList.assertMessagesReceived(messageCount);

        // lets now look into the received messages
        List list = messageList.getMessages();
        NormalizedMessage message = (NormalizedMessage) list.get(0);
        Object property = message.getProperty("foo");
        assertEquals("Message 'foo' header", "hello", property);
    }
View Full Code Here

TOP

Related Classes of org.apache.servicemix.tck.MessageList

Copyright © 2018 www.massapicom. 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.