Ejemplo n.º 1
0
        public void MessageWasProcessed_condition_should_match_base_type()
        {
            var scenarioContext = new IntegrationScenarioContext();

            scenarioContext.CaptureInvokedHandler(new HandlerInvocation()
            {
                Message       = new InheritedMessage(),
                EndpointName  = "fake-endpoint",
                HandlerType   = typeof(MessageInterfaceHandler),
                HandlingError = null,
                MessageType   = typeof(InheritedMessage)
            });

            Assert.IsTrue(scenarioContext.MessageWasProcessed <IMessageInterface>());
        }
        public void MessageWasProcessed_condition_should_match_type()
        {
            var scenarioContext = new IntegrationScenarioContext();

            scenarioContext.CaptureInvokedSaga(new SagaInvocation()
            {
                Message       = new TestMessage(),
                EndpointName  = "fake-endpoint",
                SagaType      = typeof(TestSaga),
                HandlingError = null,
                MessageType   = typeof(TestMessage)
            });

            Assert.IsTrue(scenarioContext.MessageWasProcessed <TestMessage>());
        }