use of io.spine.server.event.given.EventSubscriberMethodTestEnv.ValidTwoParams in project core-java by SpineEventEngine.
the class EventSubscriberMethodShould method invoke_subscriber_method.
@Test
public void invoke_subscriber_method() throws InvocationTargetException {
final ValidTwoParams subscriberObject;
subscriberObject = spy(new ValidTwoParams());
final EventSubscriberMethod subscriber = EventSubscriberMethod.from(subscriberObject.getMethod());
final RefProjectCreated msg = Given.EventMessage.projectCreated();
subscriber.invoke(subscriberObject, msg, EventContext.getDefaultInstance());
verify(subscriberObject, times(1)).handle(msg, EventContext.getDefaultInstance());
}
use of io.spine.server.event.given.EventSubscriberMethodTestEnv.ValidTwoParams in project core-java by SpineEventEngine.
the class EventSubscriberMethodShould method consider_subscriber_with_msg_and_context_params_valid.
@Test
public void consider_subscriber_with_msg_and_context_params_valid() {
final Method subscriber = new ValidTwoParams().getMethod();
assertIsEventSubscriber(subscriber, true);
}
Aggregations