Package com.consol.citrus.jms.message

Examples of com.consol.citrus.jms.message.JmsMessage


    @Override
    public Message receive(String selector, TestContext context, long timeout) {
        Message receivedMessage = super.receive(selector, context, timeout);

        JmsMessage jmsMessage;
        if (receivedMessage instanceof JmsMessage) {
            jmsMessage = (JmsMessage) receivedMessage;
        } else {
            jmsMessage = new JmsMessage(receivedMessage);
        }

        saveReplyDestination(jmsMessage, context);

        return jmsMessage;
View Full Code Here


        expectLastCall().once();

        replay(jmsTemplate, connectionFactory, messageProducer);

        JmsSyncConsumer jmsSyncConsumer = (JmsSyncConsumer)endpoint.createConsumer();
        jmsSyncConsumer.saveReplyDestination(new JmsMessage("").setReplyTo(replyDestination), context);
        jmsSyncConsumer.send(message, context);

        verify(jmsTemplate, connectionFactory, messageProducer);
    }
View Full Code Here

        expect(session.getTransacted()).andReturn(false).once();

        replay(jmsTemplate, connectionFactory, messageProducer, connection, session);

        JmsSyncConsumer jmsSyncConsumer = (JmsSyncConsumer)endpoint.createConsumer();
        jmsSyncConsumer.saveReplyDestination(new JmsMessage("").setReplyTo(replyDestination), context);
        jmsSyncConsumer.send(message, context);

        verify(jmsTemplate, connectionFactory, messageProducer, connection, session);
    }
View Full Code Here

        endpoint.getEndpointConfiguration().setConnectionFactory(connectionFactory);

        MessageCorrelator correlator = new DefaultMessageCorrelator();
        endpoint.getEndpointConfiguration().setCorrelator(correlator);

        JmsMessage requestMessage = new JmsMessage("")
                .setReplyTo(replyDestination);

        context.saveCorrelationKey(requestMessage.getId(), endpoint.createConsumer());

        Map<String, Object> headers = new HashMap<String, Object>();
        final Message message = new DefaultMessage("<TestRequest><Message>Hello World!</Message></TestRequest>", headers);

        reset(jmsTemplate, connectionFactory, messageProducer, connection, session);
View Full Code Here

    @Test
    public void testNoCorrelationKeyFound() {
        JmsSyncEndpoint endpoint = new JmsSyncEndpoint();
        endpoint.getEndpointConfiguration().setConnectionFactory(connectionFactory);

        JmsMessage requestMessage = new JmsMessage("");

        MessageCorrelator correlator = new DefaultMessageCorrelator();
        endpoint.getEndpointConfiguration().setCorrelator(correlator);

        JmsSyncEndpoint dummyEndpoint = new JmsSyncEndpoint();
View Full Code Here

    @Test
    public void testSendMessageWithMissingReplyTo() throws JMSException {
        JmsSyncEndpoint endpoint = new JmsSyncEndpoint();
        endpoint.getEndpointConfiguration().setConnectionFactory(connectionFactory);

        JmsMessage requestMessage = new JmsMessage("");

        MessageCorrelator correlator = new DefaultMessageCorrelator();
        endpoint.getEndpointConfiguration().setCorrelator(correlator);

        context.saveCorrelationKey("123456789", endpoint.createConsumer());
View Full Code Here

TOP

Related Classes of com.consol.citrus.jms.message.JmsMessage

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.