use of cern.laser.client.services.selection.LaserSelectionException in project ACS by ACS-Community.
the class AlarmListenerContainerTest method testDispatchException.
/**
* Test the dispatching of exception
*
*
*/
public void testDispatchException() throws Exception {
assertEquals(0, container.getAlarmListenersSize());
AlarmListenerForTesting alarmL1 = new AlarmListenerForTesting("AlarmListenerName");
AlarmListener listener1 = container.addAlarmListener(alarmL1);
assertNotNull(listener1);
assertEquals(1, container.getAlarmListenersSize());
assertEquals(0, container.getStatListenersSize());
int numExceptions = 25;
for (int t = 1; t < numExceptions + 1; t++) {
container.dispatchException(new LaserSelectionException("Code_" + t));
assertEquals(t, alarmL1.numExceptions);
assertEquals(0, alarmL1.numAlarms);
}
}
Aggregations