public void GetRegistrationsShouldSupportMultipleRecord()
        {
            // Arrange.
            var handler = new TypeMessageHandlerRegistration<ICommandHandler>(typeof(ICommandHandler<>), typeof(RemoveOrderCommandHandler));

            // Act.
            var registrations = handler.GetRegistrations();

            // Assert.
            Assert.Equal(2, registrations.Count);
            Assert.Equal(typeof(RemoveOrderCommandHandler), registrations[typeof(DeleteOrderCommand)][0]);
            Assert.Equal(typeof(RemoveOrderCommandHandler), registrations[typeof(CancelOrderCommand)][0]);
        }
        public void GetRegistrationsShouldSupportMultipleRecord()
        {
            // Arrange.
            var handler = new TypeMessageHandlerRegistration <ICommandHandler>(typeof(ICommandHandler <>), typeof(RemoveOrderCommandHandler));

            // Act.
            var registrations = handler.GetRegistrations();

            // Assert.
            Assert.Equal(2, registrations.Count);
            Assert.Equal(typeof(RemoveOrderCommandHandler), registrations[typeof(DeleteOrderCommand)][0]);
            Assert.Equal(typeof(RemoveOrderCommandHandler), registrations[typeof(CancelOrderCommand)][0]);
        }
        public void GetRegistrationsShouldReturnSingleRecord()
        {
            // Arrange.
            var handler = new TypeMessageHandlerRegistration<ICommandHandler>(typeof(ICommandHandler<>), typeof(ConfirmOrderCommandHandler));
            
            // Act.
            var registrations = handler.GetRegistrations();

            // Assert.
            Assert.Equal(1, registrations.Count);
            Assert.Equal(typeof(ConfirmOrderCommand), registrations.FirstOrDefault().Key);
            Assert.Equal(typeof(ConfirmOrderCommandHandler), registrations.FirstOrDefault().Value[0]);
        }
        public void GetRegistrationsShouldReturnSingleRecord()
        {
            // Arrange.
            var handler = new TypeMessageHandlerRegistration <ICommandHandler>(typeof(ICommandHandler <>), typeof(ConfirmOrderCommandHandler));

            // Act.
            var registrations = handler.GetRegistrations();

            // Assert.
            Assert.Equal(1, registrations.Count);
            Assert.Equal(typeof(ConfirmOrderCommand), registrations.FirstOrDefault().Key);
            Assert.Equal(typeof(ConfirmOrderCommandHandler), registrations.FirstOrDefault().Value[0]);
        }