Exemplo n.º 1
0
 public void suspend_causes_no_handlers_to_fire()
 {
     eventMap.MapListener(eventDispatcher, CustomEvent.Type.STARTED, (Action <IEvent>)listener);
     eventMap.MapListener(eventDispatcher, EventType.COMPLETE, (Action <IEvent>)listener);
     eventMap.MapListener(eventDispatcher, EventType.CHANGE, (Action <IEvent>)listener);
     eventMap.Suspend();
     eventDispatcher.Dispatch(new CustomEvent(CustomEvent.Type.STARTED));
     eventDispatcher.Dispatch(new Event(EventType.COMPLETE));
     eventDispatcher.Dispatch(new Event(EventType.CHANGE));
     Assert.That(listenerExecuted, Is.False);
 }