Examples of CreateMessageProviderCommand


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

        assertEquals("Message payload size is incorrect", size, text.length());
    }

    public void testCreateMessageProviderAndSendMessage() throws Exception
    {
        final CreateMessageProviderCommand messageProviderCommand = new CreateMessageProviderCommand();
        messageProviderCommand.setProviderName("test1");
        Map<String, PropertyValue> messageProperties = new HashMap<String, PropertyValue>();
        messageProperties.put("test", new SimplePropertyValue("testValue"));
        messageProperties.put("priority", new SimplePropertyValue(new Integer(9)));
        messageProviderCommand.setMessageProperties(messageProperties);
        _delegate.createMessageProvider(messageProviderCommand);

        final CreateProducerCommand producerCommand = new CreateProducerCommand();
        producerCommand.setNumberOfMessages(1);
        producerCommand.setDeliveryMode(DeliveryMode.PERSISTENT);
        producerCommand.setPriority(6);
        producerCommand.setParticipantName("test");
        producerCommand.setMessageSize(10);
        producerCommand.setSessionName("testSession");
        producerCommand.setDestinationName(getTestQueueName());
        producerCommand.setMessageProviderName(messageProviderCommand.getProviderName());

        Session session = _connection.createSession(true, Session.SESSION_TRANSACTED);
        _delegate.addConnection("name-does-not-matter", _connection);
        _delegate.addSession(producerCommand.getSessionName(), session);
        _delegate.createProducer(producerCommand);
View Full Code Here

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

        verify(_client).tearDownTest();
    }

    public void testCreateMessageProvider() throws Exception
    {
        final CreateMessageProviderCommand command = new CreateMessageProviderCommand();
        command.setProviderName("test");
        _visitor.visit(command);
        verify(_delegate).createMessageProvider(command);
    }
View Full Code Here

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

    public void testCreateCommandsForMessageProvider()
    {
        Map<String, PropertyValue> messageProperties = new HashMap<String, PropertyValue>();
        messageProperties.put("test", new SimplePropertyValue("testValue"));
        MessageProviderConfig config = new MessageProviderConfig("test", messageProperties);
        CreateMessageProviderCommand command = config.createCommand();
        assertNotNull("Command should not be null", command);
        assertNotNull("Unexpected name", command.getProviderName());
        assertEquals("Unexpected properties", messageProperties, command.getMessageProperties());
    }
View Full Code Here

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

        return _messageProperties;
    }

    public CreateMessageProviderCommand createCommand()
    {
        CreateMessageProviderCommand command = new CreateMessageProviderCommand();
        command.setProviderName(_name);
        command.setMessageProperties(_messageProperties);
        return command;
    }
View Full Code Here

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

        verify(_client).tearDownTest();
    }

    public void testCreateMessageProvider() throws Exception
    {
        final CreateMessageProviderCommand command = new CreateMessageProviderCommand();
        command.setProviderName("test");
        _visitor.visit(command);
        verify(_delegate).createMessageProvider(command);
    }
View Full Code Here

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

    public void testCreateCommandsForMessageProvider()
    {
        Map<String, PropertyValue> messageProperties = new HashMap<String, PropertyValue>();
        messageProperties.put("test", new SimplePropertyValue("testValue"));
        MessageProviderConfig config = new MessageProviderConfig("test", messageProperties);
        CreateMessageProviderCommand command = config.createCommand();
        assertNotNull("Command should not be null", command);
        assertNotNull("Unexpected name", command.getProviderName());
        assertEquals("Unexpected properties", messageProperties, command.getMessageProperties());
    }
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.