public void AssertionFailsIfAnExceptionIsThrownCustom() { var thing = new EventMocker(); Assert.ThrowsException <InvalidOperationException>(() => AssertExtension.DoesNotTriggerEvent <EventMocker.CustomEventArgs>(x => thing.SomeTypedEvent += x, () => thing.ThrowException())); }
public void AssertionFailsIfEventIsTriggered() { var thing = new EventMocker(); Assert.ThrowsException <AssertFailedException>(() => AssertExtension.DoesNotTriggerEvent(x => thing.SomeEvent += x, () => thing.TriggerEvent())); }
public void AssertionSucceedsIfCustomEventDoesNotTrigger() { var thing = new EventMocker(); AssertExtension.DoesNotTriggerEvent <EventMocker.CustomEventArgs>(x => thing.SomeTypedEvent += x, () => thing.SomethingUnrelated()); }
public void AssertionSucceeedsIfEventDoesNotTrigger() { var thing = new EventMocker(); AssertExtension.DoesNotTriggerEvent(x => thing.SomeEvent += x, () => thing.SomethingUnrelated()); }
public void AssertionFailsIfCustomEventDoesNotTrigger() { var thing = new EventMocker(); Assert.ThrowsException <AssertFailedException>(() => AssertExtension.TriggersEvent <EventMocker.CustomEventArgs>(x => thing.SomeTypedEvent += x, () => thing.SomethingUnrelated())); }
public void AssertionFailsIfAnExceptionIsThrown() { var thing = new EventMocker(); Assert.ThrowsException <InvalidOperationException>(() => AssertExtension.TriggersEvent(x => thing.SomeEvent += x, () => thing.ThrowException())); }
public void AssertionSucceedsIfCustomEventIsTriggered() { var thing = new EventMocker(); AssertExtension.TriggersEvent <EventMocker.CustomEventArgs>(x => thing.SomeTypedEvent += x, () => thing.TriggerTypedEvent()); }
public void AssertionSucceedsIfEventIsTriggered() { var thing = new EventMocker(); AssertExtension.TriggersEvent(x => thing.SomeEvent += x, () => thing.TriggerEvent()); }