Example #1
0
        public void AssertionFailsIfEventIsTriggered()
        {
            var thing = new EventMocker();

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

            AssertExtension.TriggersEvent(x => thing.SomeEvent += x, () => thing.TriggerEvent());
        }