public void ShouldGetTypedInstanceOfRegisteredType()
        {
            // Arrange
            var services = new ServiceConnect.Container.Default.Container();

            services.RegisterForAll(typeof(MyMessageHandler));
            var busContainer = new DefaultBusContainer();

            busContainer.Initialize(services);

            // Act
            var result = busContainer.GetInstance <IMessageHandler <MyMessage> >();

            // Assert
            Assert.NotNull(result);
            Assert.Equal("MyMessageHandler", result.GetType().Name);
        }
        public void ShouldGetInstanceOfRegisteredTypeWithCtorParameters()
        {
            // Arrange
            var services = new ServiceConnect.Container.Default.Container();

            services.RegisterForAll(typeof(MyMessageHandler2));
            var busContainer = new DefaultBusContainer();

            busContainer.Initialize(services);

            // Act
            var result = busContainer.GetInstance <IMessageHandler <MyMessage> >(new Dictionary <string, object> {
                { "name", "TestName" }
            });

            // Assert
            Assert.NotNull(result);
            Assert.Equal("MyMessageHandler2", result.GetType().Name);
        }