public void SetupBeforeEachTest()
        {
            this.messageHandlerTypesIndexFactory = A.Fake<IMessageHandlerTypesIndexFactory>();
             this.messageHandlerInvokerFactory = A.Fake<IMessageHandlerInvokerFactory>();
             this.messageHandlerTypesIndex = A.Fake<IMessageHandlerTypesIndex>();
             this.messageHandlerInvoker = A.Fake<IMessageHandlerInvoker>();
             this.configuration = A.Fake<IConfiguration>();
             this.messageServiceExchange = A.Fake<IMessageServiceExchange>();

             A.CallTo(() => this.messageHandlerTypesIndexFactory.Create(A<Type[]>._)).Returns(this.messageHandlerTypesIndex);
             A.CallTo(() => this.messageHandlerInvokerFactory.CreateAggregate(A<IMessageHandlerTypesIndex>._)).Returns(this.messageHandlerInvoker);

             var messageType = typeof(TestMessageA);
             A.CallTo(() => this.messageHandlerTypesIndex.GetAllMessageTypes()).Returns(new[] { messageType });

             this.componentUnderTest = new InMemoryMessageListener(typeof(object), this.messageHandlerTypesIndexFactory, this.messageHandlerInvokerFactory, this.configuration, this.messageServiceExchange);
        }
        public void ImplementIMessageListener()
        {
            var componentUnderTest = new InMemoryMessageListener(typeof(object), this.messageHandlerTypesIndexFactory, this.messageHandlerInvokerFactory, this.configuration, this.messageServiceExchange);

             Assert.That(componentUnderTest, Is.InstanceOf<IMessageListener>());
        }