Test priorities for inheritance
zdm/event-bus/pipeline/head This commit looks good
Details
zdm/event-bus/pipeline/head This commit looks good
Details
parent
7fb633d69f
commit
722bf2b999
@ -1,20 +1,25 @@
|
||||
package dev.kske.eventbus.core;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
/**
|
||||
* An abstract class defining a package-private and a private handler for {@link SimpleEvent}.
|
||||
*
|
||||
* @author Kai S. K. Engelbart
|
||||
* @since 1.3.0
|
||||
*/
|
||||
@Priority(200)
|
||||
abstract class SimpleEventListenerBase {
|
||||
|
||||
@Event
|
||||
void onSimpleEventAbstractHandler(SimpleEvent event) {
|
||||
event.increment();
|
||||
fail("This handler should not be invoked");
|
||||
}
|
||||
|
||||
@Priority(150)
|
||||
@Event
|
||||
private void onSimpleEventPrivate(SimpleEvent event) {
|
||||
assertSame(1, event.getCounter());
|
||||
event.increment();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue