Search in sources :

Example 1 with CreateMessageProviderCommand

use of org.apache.qpid.disttest.message.CreateMessageProviderCommand in project qpid-broker-j by apache.

the class MessageProviderConfigTest method testCreateCommandsForMessageProvider.

@Test
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());
}
Also used : SimplePropertyValue(org.apache.qpid.disttest.client.property.SimplePropertyValue) HashMap(java.util.HashMap) PropertyValue(org.apache.qpid.disttest.client.property.PropertyValue) SimplePropertyValue(org.apache.qpid.disttest.client.property.SimplePropertyValue) CreateMessageProviderCommand(org.apache.qpid.disttest.message.CreateMessageProviderCommand) Test(org.junit.Test)

Example 2 with CreateMessageProviderCommand

use of org.apache.qpid.disttest.message.CreateMessageProviderCommand in project qpid-broker-j by apache.

the class MessageProviderConfig method createCommand.

public CreateMessageProviderCommand createCommand() {
    CreateMessageProviderCommand command = new CreateMessageProviderCommand();
    command.setProviderName(_name);
    command.setMessageProperties(_messageProperties);
    return command;
}
Also used : CreateMessageProviderCommand(org.apache.qpid.disttest.message.CreateMessageProviderCommand)

Example 3 with CreateMessageProviderCommand

use of org.apache.qpid.disttest.message.CreateMessageProviderCommand in project qpid-broker-j by apache.

the class ClientCommandVisitorTest method testCreateMessageProvider.

@Test
public void testCreateMessageProvider() throws Exception {
    final CreateMessageProviderCommand command = new CreateMessageProviderCommand();
    command.setProviderName("test");
    _visitor.visit(command);
    verify(_delegate).createMessageProvider(command);
}
Also used : CreateMessageProviderCommand(org.apache.qpid.disttest.message.CreateMessageProviderCommand) Test(org.junit.Test)

Aggregations

CreateMessageProviderCommand (org.apache.qpid.disttest.message.CreateMessageProviderCommand)3 Test (org.junit.Test)2 HashMap (java.util.HashMap)1 PropertyValue (org.apache.qpid.disttest.client.property.PropertyValue)1 SimplePropertyValue (org.apache.qpid.disttest.client.property.SimplePropertyValue)1