public void AssertRaised_EventRaised_DoesNotInduceError() { var observable = new AsynchronousObservable(); Action exercise = () => observable.Induce(true); EventMonitor.AssertRaised( exercise, handler => observable.Induced += handler); }
public void AssertRaised_EventNotRaised_InducesError() { var observable = new AsynchronousObservable(); Action exercise = () => observable.Induce(false); Assert.Throws <EventMonitorException>(() => EventMonitor.AssertRaised( exercise, handler => observable.Induced += handler)); }