public void AssertionFailsIfEventIsTriggered() { var thing = new EventMocker(); Assert.ThrowsException <AssertFailedException>(() => AssertExtension.DoesNotTriggerEvent(x => thing.SomeEvent += x, () => thing.TriggerEvent())); }
public void AssertionSucceedsIfEventIsTriggered() { var thing = new EventMocker(); AssertExtension.TriggersEvent(x => thing.SomeEvent += x, () => thing.TriggerEvent()); }