Ejemplo n.º 1
0
        public void AssertionFailsIfAnExceptionIsThrownCustom()
        {
            var thing = new EventMocker();

            Assert.ThrowsException <InvalidOperationException>(() =>
                                                               AssertExtension.DoesNotTriggerEvent <EventMocker.CustomEventArgs>(x => thing.SomeTypedEvent += x, () => thing.ThrowException()));
        }
Ejemplo n.º 2
0
        public void AssertionFailsIfAnExceptionIsThrown()
        {
            var thing = new EventMocker();

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