public void ShouldOnlyInvokeBaseClassHandlerMethofWhenHandlingBaseClassMessage() { var saga = new MessageHierarchySaga(); Test.Saga(saga) .WhenHandling <BaseClassMessage>(); Assert.IsTrue(saga.BaseClassMessageHandlerInvoked); Assert.IsFalse(saga.BaseClassImplementingMessageHandlerInvoked); }
public void ShouldInvokeAllHandlerMethodsWhenHandlingSubclassedMessage() { var saga = new MessageHierarchySaga(); Test.Saga(saga) .WhenHandling <BaseClassImplementingMessage>(); Assert.IsTrue(saga.BaseClassMessageHandlerInvoked); Assert.IsTrue(saga.BaseClassImplementingMessageHandlerInvoked); }