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

            AssertExtension.TriggersEvent <EventMocker.CustomEventArgs>(x => thing.SomeTypedEvent += x, () => thing.TriggerTypedEvent());
        }
Exemplo n.º 2
0
        public void AssertionFailsIfCustomEventIsTriggered()
        {
            var thing = new EventMocker();

            Assert.ThrowsException <AssertFailedException>(() =>
                                                           AssertExtension.DoesNotTriggerEvent <EventMocker.CustomEventArgs>(x => thing.SomeTypedEvent += x, () => thing.TriggerTypedEvent()));
        }