Handler Caching #37

Merged
kske merged 5 commits from f/handler-caching into develop 2022-01-18 17:11:38 +01:00
Showing only changes of commit 8fae4f6d76 - Show all commits

View File

@ -50,8 +50,6 @@ class DispatchTest {
*/ */
@Test @Test
void testDebugExecutionOrder() { void testDebugExecutionOrder() {
String executionOrder = bus.debugExecutionOrder(SimpleEvent.class);
System.out.println(executionOrder);
assertEquals( assertEquals(
"Event handler execution order for class dev.kske.eventbus.core.SimpleEvent (3 handler(s)):\n" "Event handler execution order for class dev.kske.eventbus.core.SimpleEvent (3 handler(s)):\n"
+ "==========================================================================================\n" + "==========================================================================================\n"
@ -59,7 +57,7 @@ class DispatchTest {
+ "ReflectiveEventHandler[eventType=class dev.kske.eventbus.core.SimpleEvent, polymorphic=false, priority=150, method=static void dev.kske.eventbus.core.DispatchTest.onSimpleEventSecond(dev.kske.eventbus.core.SimpleEvent), useParameter=true]\n" + "ReflectiveEventHandler[eventType=class dev.kske.eventbus.core.SimpleEvent, polymorphic=false, priority=150, method=static void dev.kske.eventbus.core.DispatchTest.onSimpleEventSecond(dev.kske.eventbus.core.SimpleEvent), useParameter=true]\n"
+ "CallbackEventHandler[eventType=class dev.kske.eventbus.core.SimpleEvent, polymorphic=false, priority=100]\n" + "CallbackEventHandler[eventType=class dev.kske.eventbus.core.SimpleEvent, polymorphic=false, priority=100]\n"
+ "==========================================================================================", + "==========================================================================================",
executionOrder); bus.debugExecutionOrder(SimpleEvent.class));
} }
/** /**
@ -70,9 +68,8 @@ class DispatchTest {
*/ */
@Test @Test
void testBindingCache() { void testBindingCache() {
String executionOrder = bus.debugExecutionOrder(SimpleEventSub.class); assertEquals(bus.debugExecutionOrder(SimpleEventSub.class),
System.out.println(executionOrder); bus.debugExecutionOrder(SimpleEventSub.class));
assertEquals(executionOrder, bus.debugExecutionOrder(SimpleEventSub.class));
} }
kske marked this conversation as resolved
Review

Why?

Why?
@Event @Event