use of com.enonic.xp.app.ApplicationListener in project xp by enonic.
the class ApplicationListenerHubTest method testActivatedDeactivated.
@Test
void testActivatedDeactivated() {
final Application app = mock(Application.class);
ApplicationListenerHub dispatcher = new ApplicationListenerHub();
final ApplicationListener listener = mock(ApplicationListener.class);
dispatcher.addListener(listener);
dispatcher.activated(app);
dispatcher.deactivated(app);
final InOrder inOrder = inOrder(listener);
inOrder.verify(listener, times(1)).activated(same(app));
inOrder.verify(listener, times(1)).deactivated(same(app));
}
Aggregations