public class EventHandlerTestHelper extends Object
EventHandler
in a unit test.Modifier and Type | Class and Description |
---|---|
static interface |
EventHandlerTestHelper.MockEventHandler<E,R>
A mock handler that is used to handle events in a unit test
|
Constructor and Description |
---|
EventHandlerTestHelper() |
Modifier and Type | Method and Description |
---|---|
static <E,R> EventHandler<E> |
createMockEventHandler(Class<E> eventClass,
EventHandlerTestHelper.MockEventHandler<E,R> handler)
Creates a mock
EventHandler |
public static <E,R> EventHandler<E> createMockEventHandler(Class<E> eventClass, EventHandlerTestHelper.MockEventHandler<E,R> handler)
EventHandler
E
- The type of the event being handledR
- The type of the return value of the eventeventClass
- The class of the event that is being handledhandler
- The mock handler that gets called when the event is triggered