Beispiel #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>());
        }
Beispiel #2
0
        public void MessageWasProcessedByHandler_condition_should_match_type()
        {
            var scenarioContext = new IntegrationScenarioContext();

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

            Assert.IsTrue(scenarioContext.MessageWasProcessedByHandler <TestMessage, TestMessageHandler>());
        }