public FakeTimedSimulatedEvent(ISimulatedEvent originalEvent) { this.eventCallback = originalEvent.EventDelegate; }
/// <summary> /// This overridding Add method replaces the "real" event with a fake one. /// The fake event doesn't have the timer so we can manually execute the /// events to allow for testing of them without having to expose the timer /// methods publically and violating OO principles. /// </summary> /// <param name="simulatedEvent"></param> public override void Add(ISimulatedEvent simulatedEvent) { // map inbound event to FakeEvent and add to the collection EventList.Add(new FakeTimedSimulatedEvent(simulatedEvent)); }
public virtual void Add(ISimulatedEvent simulatedEvent) { EventList.Add(simulatedEvent); }