Esempio n. 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());
 }
Esempio n. 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());
 }