Examples of assertMessagesReceived()


Examples of org.apache.activemq.util.MessageIdList.assertMessagesReceived()

        LOG.info("consumerA = " + messagesA);
        LOG.info("consumerB = " + messagesB);

        messagesA.assertMessagesReceived(0);
        messagesB.assertMessagesReceived(1);

    }


    public void testSendRestart() throws Exception {
View Full Code Here

Examples of org.apache.activemq.util.MessageIdList.assertMessagesReceived()

        LOG.info("consumerA = " + messagesA);
        LOG.info("consumerB = " + messagesB);

        messagesA.assertMessagesReceived(0);
        messagesB.assertMessagesReceived(1);
    }

    protected void restartBroker(String brokerName) throws Exception {
        destroyBroker("BrokerA");
        BrokerService broker = createBroker(new URI("broker:(tcp://localhost:61616)/BrokerA?persistent=true&useJmx=false"));
View Full Code Here

Examples of org.apache.activemq.util.MessageIdList.assertMessagesReceived()

            producer.send(message);
        }
        producer.close();
        LOG.info("Sent: " + updateMessageCount + " update messages");

        listener.assertMessagesReceived(messageCount);
    }

    protected void setUp() throws Exception {
        useTopic = true;
        bindAddress = "vm://localhost";
View Full Code Here

Examples of org.apache.activemq.util.MessageIdList.assertMessagesReceived()

        MessageConsumer consumer = createConsumer();
        MessageIdList listener = new MessageIdList();
        consumer.setMessageListener(listener);
        listener.waitForMessagesToArrive(messageCount);
        listener.assertMessagesReceived(messageCount);

    }

    protected void setUp() throws Exception {
        useTopic = true;
View Full Code Here

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

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

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

    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

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

    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

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

    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

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

        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.