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;
}
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;
}
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());
}
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);
}
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);
}
Aggregations