Add static event handler test
This commit is contained in:
parent
dbb816c6cb
commit
f6e5c90a44
@ -12,7 +12,7 @@ import org.junit.jupiter.api.*;
|
|||||||
*/
|
*/
|
||||||
class EventBusTest implements EventListener {
|
class EventBusTest implements EventListener {
|
||||||
|
|
||||||
int hits;
|
static int hits;
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void registerListener() {
|
public void registerListener() {
|
||||||
@ -36,7 +36,7 @@ class EventBusTest implements EventListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Event(eventType = SimpleEvent.class, priority = 150)
|
@Event(eventType = SimpleEvent.class, priority = 150)
|
||||||
private void onSimpleEventSecond() {
|
private static void onSimpleEventSecond() {
|
||||||
++hits;
|
++hits;
|
||||||
assertEquals(3, hits);
|
assertEquals(3, hits);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user