Package org.apache.servicemix.tck

Examples of org.apache.servicemix.tck.MessageList.assertMessagesReceived()


    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);
View Full Code Here


    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);
View Full Code Here

    public void testCamelInvokingJbi() throws Exception {
        sendExchangeAsync("<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);
View Full Code Here

    public void testWithoutProperties() throws Exception {
        container.activateComponent(createEndpoint(false), "servicemix-jms");
        jmsTemplate.send("destination", new InternalCreator());
        MessageList messageList = receiver.getMessageList();
        messageList.assertMessagesReceived(1);
        NormalizedMessage message = (NormalizedMessage)messageList.getMessages().get(0);
        assertNull("Not expected property found", message.getProperty(MSG_PROPERTY));
        assertNull("Not expected property found", message.getProperty(MSG_PROPERTY_BLACKLISTED));
    }
View Full Code Here

    public void testConsumerSimple() throws Exception {
        container.activateComponent(createEndpoint(), "servicemix-jms");
        jmsTemplate.send("destination", new InternalCreator());
        MessageList messageList = receiver.getMessageList();
        messageList.assertMessagesReceived(1);
        NormalizedMessage message = (NormalizedMessage)messageList.getMessages().get(0);
        assertNotNull("Expected property not found", message.getProperty(MSG_PROPERTY));
        assertNull("Black listed property found", message.getProperty(MSG_PROPERTY_BLACKLISTED));
    }
View Full Code Here

        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");
View Full Code Here

    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);
View Full Code Here

    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);
View Full Code Here

        assertNotNull(getReceiver());

        sender.sendMessages(messageCount);

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

    protected Sender getSender() {
        Object cmp = getComponent("sender");
        if (cmp instanceof ComponentAdaptor) {
View Full Code Here

        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");
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.