Testing EventBus Inheritance and Subclass Event Handling in greenrobot/EventBus
This test suite examines inheritance behavior in EventBus by extending the EventBusInheritanceTest class. It specifically tests event subscription and handling in subclasses, focusing on method overriding patterns and event class hierarchies.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
greenrobot/eventbus
EventBusTestJava/src/main/java/org/greenrobot/eventbus/EventBusInheritanceSubclassTest.java
package org.greenrobot.eventbus;
import org.junit.Ignore;
// Need to use upper class or Android test runner does not pick it up
public class EventBusInheritanceSubclassTest extends EventBusInheritanceTest {
int countMyEventOverwritten;
@Subscribe
public void onEvent(MyEvent event) {
countMyEventOverwritten++;
}
@Override
@Ignore
public void testEventClassHierarchy() {
// TODO fix test in super, then remove this
}
}