Search in sources :

Example 1 with StopClientCommand

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

the class ClientTest method testProcessInstructionVisitsCommandAndResponds.

@Test
public void testProcessInstructionVisitsCommandAndResponds() throws Exception {
    // has to be declared to be of supertype Command otherwise Mockito verify()
    // refers to wrong method
    final Command command = new StopClientCommand();
    _client.processInstruction(command);
    verify(_visitor).visit(command);
    verify(_delegate).sendResponseMessage(isA(Response.class));
}
Also used : Response(org.apache.qpid.disttest.message.Response) StopClientCommand(org.apache.qpid.disttest.message.StopClientCommand) Command(org.apache.qpid.disttest.message.Command) StopClientCommand(org.apache.qpid.disttest.message.StopClientCommand) Test(org.junit.Test)

Example 2 with StopClientCommand

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

the class ClientCommandVisitorTest method testStopClient.

@Test
public void testStopClient() {
    StopClientCommand command = new StopClientCommand();
    _visitor.visit(command);
    verify(_client).stop();
}
Also used : StopClientCommand(org.apache.qpid.disttest.message.StopClientCommand) Test(org.junit.Test)

Aggregations

StopClientCommand (org.apache.qpid.disttest.message.StopClientCommand)2 Test (org.junit.Test)2 Command (org.apache.qpid.disttest.message.Command)1 Response (org.apache.qpid.disttest.message.Response)1