Add static event handler test

This commit is contained in:
Leon Hofmeister 2020-09-25 16:22:27 +02:00
parent dbb816c6cb
commit f6e5c90a44
Signed by: delvh
GPG Key ID: 3DECE05F6D9A647C

View File

@ -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);
} }