Example #1
0
 public void PublishAnotherEventDoesNotInvokeHandlersOfOtherEvents(
     Mock <IEventHandler <TestEvent> > testHandler,
     TestAnotherEvent anotherEventData)
 {
     DomainEvents.Subscribe(testHandler.Object);
     DomainEvents.Publish(anotherEventData);
     testHandler.Verify(a => a.Handle(It.IsAny <TestEvent>()), Times.Never());
 }
Example #2
0
 public void PublishAnotherEventDoesNotInvokeHandlersOfOtherEvents(
     Mock<IEventHandler<TestEvent>> testHandler,
     TestAnotherEvent anotherEventData)
 {
     DomainEvents.Subscribe(testHandler.Object);
     DomainEvents.Publish(anotherEventData);
     testHandler.Verify(a => a.Handle(It.IsAny<TestEvent>()), Times.Never());
 }