Search in sources :

Example 1 with CreateConnectionCommand

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

the class ConnectionConfig method createCommand.

private CreateConnectionCommand createCommand() {
    CreateConnectionCommand command = new CreateConnectionCommand();
    command.setConnectionName(_name);
    command.setConnectionFactoryName(_factory);
    return command;
}
Also used : CreateConnectionCommand(org.apache.qpid.disttest.message.CreateConnectionCommand)

Example 2 with CreateConnectionCommand

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

the class OrdinaryTestRunnerTest method createTestInstanceWithConnection.

private TestInstance createTestInstanceWithConnection() {
    TestInstance testInstance = mock(TestInstance.class);
    List<CommandForClient> commands = Arrays.asList(new CommandForClient(CLIENT1_CONFIGURED_NAME, new CreateConnectionCommand("conn1", "factory")));
    when(testInstance.createCommands()).thenReturn(commands);
    return testInstance;
}
Also used : TestInstance(org.apache.qpid.disttest.controller.config.TestInstance) CreateConnectionCommand(org.apache.qpid.disttest.message.CreateConnectionCommand)

Example 3 with CreateConnectionCommand

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

the class ConnectionConfigTest method testCreateCommandsForConnectionAndChildren.

@Test
public void testCreateCommandsForConnectionAndChildren() {
    ConnectionConfig connectionConfig = createConnectionConfigWithChildCommands();
    List<Command> commands = connectionConfig.createCommands();
    assertEquals((long) 3, (long) commands.size());
    assertCommandEquals(commands, 0, CreateConnectionCommand.class);
    assertCommandEquals(commands, 1, NoOpCommand.class);
    assertCommandEquals(commands, 2, NoOpCommand.class);
    CreateConnectionCommand createConnectionCommand = getCommand(commands, 0);
    assertEquals(CONNECTION_NAME, createConnectionCommand.getConnectionName());
    assertEquals(CONNECTION_FACTORY_NAME, createConnectionCommand.getConnectionFactoryName());
}
Also used : ConfigTestUtils.getCommand(org.apache.qpid.disttest.controller.config.ConfigTestUtils.getCommand) Command(org.apache.qpid.disttest.message.Command) CreateConnectionCommand(org.apache.qpid.disttest.message.CreateConnectionCommand) NoOpCommand(org.apache.qpid.disttest.message.NoOpCommand) CreateConnectionCommand(org.apache.qpid.disttest.message.CreateConnectionCommand) Test(org.junit.Test)

Example 4 with CreateConnectionCommand

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

the class ClientCommandVisitorTest method testCreateConnection.

@Test
public void testCreateConnection() throws Exception {
    final CreateConnectionCommand command = new CreateConnectionCommand();
    _visitor.visit(command);
    verify(_delegate).createConnection(command);
}
Also used : CreateConnectionCommand(org.apache.qpid.disttest.message.CreateConnectionCommand) Test(org.junit.Test)

Example 5 with CreateConnectionCommand

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

the class IterationValueTest method testApplyPopulatedIterationValueToCommandWithoutMatchingProperties.

@Test
public void testApplyPopulatedIterationValueToCommandWithoutMatchingProperties() throws Exception {
    IterationValue iterationValue = new IterationValue(_iterationValueMap);
    CreateConnectionCommand createConnectionCommand = mock(CreateConnectionCommand.class);
    iterationValue.applyToCommand(createConnectionCommand);
    verifyNoInteractions(createConnectionCommand);
}
Also used : CreateConnectionCommand(org.apache.qpid.disttest.message.CreateConnectionCommand) Test(org.junit.Test)

Aggregations

CreateConnectionCommand (org.apache.qpid.disttest.message.CreateConnectionCommand)5 Test (org.junit.Test)3 ConfigTestUtils.getCommand (org.apache.qpid.disttest.controller.config.ConfigTestUtils.getCommand)1 TestInstance (org.apache.qpid.disttest.controller.config.TestInstance)1 Command (org.apache.qpid.disttest.message.Command)1 NoOpCommand (org.apache.qpid.disttest.message.NoOpCommand)1