use of org.apache.cayenne.map.LifecycleEvent in project cayenne by apache.
the class LifecycleCallbackRegistryTest method addAnnotatedListener.
@Test
public void addAnnotatedListener() {
registry.addListener(new AnnotatedListener());
for (LifecycleEvent event : LifecycleEvent.values()) {
assertEquals(1, registry.getHandler(event).defaultListenersSize());
assertEquals(0, registry.getHandler(event).listenersSize());
}
}
use of org.apache.cayenne.map.LifecycleEvent in project cayenne by apache.
the class LifecycleCallbackRegistryTest method addDefaultListener.
@Test
public void addDefaultListener() throws Exception {
LifecycleListener listener = mock(LifecycleListener.class);
registry.addDefaultListener(listener);
for (LifecycleEvent event : LifecycleEvent.values()) {
assertEquals(1, registry.getHandler(event).defaultListenersSize());
assertEquals(0, registry.getHandler(event).listenersSize());
}
}
Aggregations