use of io.automatiko.engine.services.signal.LightSignalManager in project automatiko-engine by automatiko-io.
the class LightSignalManagerTest method testAddNewListener.
@Test
public void testAddNewListener() {
LightSignalManager sm = new LightSignalManager(mock(EventListenerResolver.class), mock(SignalManagerHub.class));
EventListener listen = mock(EventListener.class);
String type = "completion";
sm.addEventListener(type, listen);
assertThat(sm.getListeners()).hasEntrySatisfying(type, s -> assertThat(s).hasSize(1));
sm.addEventListener(type, listen);
assertThat(sm.getListeners()).hasEntrySatisfying(type, s -> assertThat(s).hasSize(1));
}
Aggregations