Package org.apache.qpid.disttest.message

Examples of org.apache.qpid.disttest.message.CreateProducerCommand


            public String getMessagePayload(CreateProducerCommand command)
            {
                return super.getMessagePayload(command);
            }
        };
        CreateProducerCommand command = new CreateProducerCommand();
        command.setMessageSize(100);
        String payloadValue = messageProvider.getMessagePayload(command);
        assertNotNull("Mesage payload should not be null", payloadValue);
        assertEquals("Unexpected payload size", 100, payloadValue.length());
    }
View Full Code Here


    }

    public void testNextMessage() throws Exception
    {
        MessageProvider messageProvider = new MessageProvider(null);
        CreateProducerCommand command = new CreateProducerCommand();
        command.setMessageSize(100);
        Message message = messageProvider.nextMessage(_session, command);
        assertNotNull("Mesage should be returned", message);
        verify(_message, atLeastOnce()).setText(isA(String.class));
    }
View Full Code Here

        ListPropertyValue list = new ListPropertyValue();
        list.setItems(listItems);
        properties.put("test3", list);

        MessageProvider messageProvider = new MessageProvider(properties);
        CreateProducerCommand command = new CreateProducerCommand();
        command.setMessageSize(100);
        Message message = messageProvider.nextMessage(_session, command);
        assertNotNull("Mesage should be returned", message);
        verify(_message, atLeastOnce()).setText(isA(String.class));
        verify(_message, atLeastOnce()).setJMSPriority(2);
        verify(_message, atLeastOnce()).setStringProperty("test1", "testValue1");
View Full Code Here

        assertNotNull(p);
    }

    public void testConfigProvidesJmsDefaults()
    {
        CreateProducerCommand p = new ProducerConfig().createCommand("session1");
        assertEquals(Message.DEFAULT_DELIVERY_MODE, p.getDeliveryMode());
        assertEquals(Message.DEFAULT_PRIORITY, p.getPriority());
        assertEquals(Message.DEFAULT_TIME_TO_LIVE, p.getTimeToLive());
    }
View Full Code Here

                timeToLive,
                interval,
                startDelay,
                providerName);

        CreateProducerCommand command = producerConfig.createCommand("session1");

        assertEquals("session1", command.getSessionName());
        assertEquals("producer1", command.getParticipantName());
        assertEquals(destination, command.getDestinationName());
        assertEquals(numberOfMessages, command.getNumberOfMessages());
        assertEquals(batchSize, command.getBatchSize());
        assertEquals(maximumDuration, command.getMaximumDuration());

        assertEquals(DeliveryMode.NON_PERSISTENT, command.getDeliveryMode());
        assertEquals(messageSize, command.getMessageSize());
        assertEquals(priority, command.getPriority());
        assertEquals(timeToLive, command.getTimeToLive());
        assertEquals(interval, command.getInterval());
        assertEquals(startDelay, command.getStartDelay());
        assertEquals(providerName, command.getMessageProviderName());
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.disttest.message.CreateProducerCommand

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.