Search in sources :

Example 1 with NoOpCommand

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

the class ConnectionConfigTest method createConnectionConfigWithChildCommands.

private ConnectionConfig createConnectionConfigWithChildCommands() {
    SessionConfig sessionConfig = mock(SessionConfig.class);
    NoOpCommand cmd1 = mock(NoOpCommand.class);
    NoOpCommand cmd2 = mock(NoOpCommand.class);
    List<Command> commands = Arrays.asList((Command) cmd1, (Command) cmd2);
    when(sessionConfig.createCommands(CONNECTION_NAME)).thenReturn(commands);
    return new ConnectionConfig(CONNECTION_NAME, CONNECTION_FACTORY_NAME, sessionConfig);
}
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) NoOpCommand(org.apache.qpid.disttest.message.NoOpCommand)

Example 2 with NoOpCommand

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

the class TestConfigTest method createClientConfigReturningCommands.

private ClientConfig createClientConfigReturningCommands(final String clientName, int numberOfCommands) {
    ClientConfig clientConfig = mock(ClientConfig.class);
    List<CommandForClient> commandList = new ArrayList<CommandForClient>();
    for (int i = 1; i <= numberOfCommands; i++) {
        commandList.add(new CommandForClient(clientName, new NoOpCommand()));
    }
    when(clientConfig.createCommands()).thenReturn(commandList);
    return clientConfig;
}
Also used : ArrayList(java.util.ArrayList) ConfigTestUtils.assertCommandForClient(org.apache.qpid.disttest.controller.config.ConfigTestUtils.assertCommandForClient) CommandForClient(org.apache.qpid.disttest.controller.CommandForClient) NoOpCommand(org.apache.qpid.disttest.message.NoOpCommand)

Aggregations

NoOpCommand (org.apache.qpid.disttest.message.NoOpCommand)2 ArrayList (java.util.ArrayList)1 CommandForClient (org.apache.qpid.disttest.controller.CommandForClient)1 ConfigTestUtils.assertCommandForClient (org.apache.qpid.disttest.controller.config.ConfigTestUtils.assertCommandForClient)1 ConfigTestUtils.getCommand (org.apache.qpid.disttest.controller.config.ConfigTestUtils.getCommand)1 Command (org.apache.qpid.disttest.message.Command)1 CreateConnectionCommand (org.apache.qpid.disttest.message.CreateConnectionCommand)1