public void AssertionSucceeedsIfEventDoesNotTrigger() { var thing = new EventMocker(); AssertExtension.DoesNotTriggerEvent(x => thing.SomeEvent += x, () => thing.SomethingUnrelated()); }
public void AssertionSucceedsIfCustomEventDoesNotTrigger() { var thing = new EventMocker(); AssertExtension.DoesNotTriggerEvent <EventMocker.CustomEventArgs>(x => thing.SomeTypedEvent += x, () => thing.SomethingUnrelated()); }
public void AssertionFailsIfEventDoesNotTrigger() { var thing = new EventMocker(); Assert.ThrowsException <AssertFailedException>(() => AssertExtension.TriggersEvent(x => thing.SomeEvent += x, () => thing.SomethingUnrelated())); }