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