use of org.apache.qpid.disttest.message.CreateSessionCommand in project qpid-broker-j by apache.
the class SessionConfigTest method testCreateCommandsForSessionAndChildren.
@Test
public void testCreateCommandsForSessionAndChildren() {
SessionConfig sessionConfig = createSessionConfigWithChildCommands();
List<Command> commands = sessionConfig.createCommands(CONNECTION_NAME);
assertEquals((long) 3, (long) commands.size());
assertCommandEquals(commands, 0, CreateSessionCommand.class);
assertCommandEquals(commands, 1, CreateProducerCommand.class);
assertCommandEquals(commands, 2, CreateConsumerCommand.class);
CreateSessionCommand createSessionCommand = getCommand(commands, 0);
assertEquals((long) Session.AUTO_ACKNOWLEDGE, (long) createSessionCommand.getAcknowledgeMode());
assertEquals(SESSION, createSessionCommand.getSessionName());
assertEquals(CONNECTION_NAME, createSessionCommand.getConnectionName());
}
use of org.apache.qpid.disttest.message.CreateSessionCommand in project qpid-broker-j by apache.
the class SessionConfig method createCommand.
private CreateSessionCommand createCommand(String connectionName) {
CreateSessionCommand command = new CreateSessionCommand();
command.setAcknowledgeMode(_acknowledgeMode);
command.setConnectionName(connectionName);
command.setSessionName(_sessionName);
return command;
}
use of org.apache.qpid.disttest.message.CreateSessionCommand in project qpid-broker-j by apache.
the class ClientCommandVisitorTest method testCreateSession.
@Test
public void testCreateSession() throws Exception {
final CreateSessionCommand command = new CreateSessionCommand();
_visitor.visit(command);
verify(_delegate).createSession(command);
}
Aggregations