Пример #1
0
        public void AssertionFailsIfAnExceptionIsThrownCustom()
        {
            var thing = new EventMocker();

            Assert.ThrowsException <InvalidOperationException>(() =>
                                                               AssertExtension.DoesNotTriggerEvent <EventMocker.CustomEventArgs>(x => thing.SomeTypedEvent += x, () => thing.ThrowException()));
        }
Пример #2
0
        public void AssertionFailsIfAnExceptionIsThrown()
        {
            var thing = new EventMocker();

            Assert.ThrowsException <InvalidOperationException>(() =>
                                                               AssertExtension.TriggersEvent(x => thing.SomeEvent += x, () => thing.ThrowException()));
        }