Search in sources :

Example 1 with ValidHandlerOneParam

use of io.spine.server.command.given.CommandHandlerMethodTestEnv.ValidHandlerOneParam in project core-java by SpineEventEngine.

the class CommandHandlerMethodShould method consider_handler_with_one_msg_param_valid.

@Test
public void consider_handler_with_one_msg_param_valid() {
    final Method handler = new ValidHandlerOneParam().getHandler();
    assertIsCommandHandler(handler, true);
}
Also used : ValidHandlerOneParam(io.spine.server.command.given.CommandHandlerMethodTestEnv.ValidHandlerOneParam) Method(java.lang.reflect.Method) Test(org.junit.Test)

Example 2 with ValidHandlerOneParam

use of io.spine.server.command.given.CommandHandlerMethodTestEnv.ValidHandlerOneParam in project core-java by SpineEventEngine.

the class CommandHandlerMethodShould method throw_ISE_for_not_handled_command_type.

@Test(expected = IllegalStateException.class)
public void throw_ISE_for_not_handled_command_type() {
    final CommandHandler handler = new ValidHandlerOneParam();
    final CommandEnvelope cmd = requestFactory.createEnvelope(startProject());
    handler.dispatch(cmd);
}
Also used : ValidHandlerOneParam(io.spine.server.command.given.CommandHandlerMethodTestEnv.ValidHandlerOneParam) CommandEnvelope(io.spine.core.CommandEnvelope) Test(org.junit.Test)

Aggregations

ValidHandlerOneParam (io.spine.server.command.given.CommandHandlerMethodTestEnv.ValidHandlerOneParam)2 Test (org.junit.Test)2 CommandEnvelope (io.spine.core.CommandEnvelope)1 Method (java.lang.reflect.Method)1