public void SubscribeToCommand_registers_handler_type(TestNybusConfigurator nybus, IServiceCollection services)
        {
            NybusConfiguratorExtensions.SubscribeToCommand <FirstTestCommand, FirstTestCommandHandler>(nybus);

            nybus.ApplyServiceConfigurations(services);

            Mock.Get(services).Verify(p => p.Add(It.Is <ServiceDescriptor>(sd => sd.ServiceType == typeof(FirstTestCommandHandler))));
        }
        public void SubscribeToCommand_registers_delegate_handler_for_command(TestNybusConfigurator nybus, ISubscriptionBuilder subscriptionBuilder, CommandReceivedAsync <FirstTestCommand> testHandler)
        {
            NybusConfiguratorExtensions.SubscribeToCommand(nybus, testHandler);

            nybus.ApplySubscriptions(subscriptionBuilder);

            Mock.Get(subscriptionBuilder).Verify(p => p.SubscribeToCommand <FirstTestCommand>(typeof(DelegateWrapperCommandHandler <FirstTestCommand>)));
        }
        public void SubscribeToCommand_registers_handler_for_command(TestNybusConfigurator nybus, ISubscriptionBuilder subscriptionBuilder)
        {
            NybusConfiguratorExtensions.SubscribeToCommand <FirstTestCommand, FirstTestCommandHandler>(nybus);

            nybus.ApplySubscriptions(subscriptionBuilder);

            Mock.Get(subscriptionBuilder).Verify(p => p.SubscribeToCommand <FirstTestCommand>(typeof(FirstTestCommandHandler)));
        }