public void CreatePipeline_StepWithSingleDependencyNotRegistered_ThrowException()
        {
            var serviceProvider = new ServiceCollection()
                                  // CustomService dependency missing
                                  .AddTransient <StepWithSingleDependency>()
                                  .BuildServiceProvider();

            var command = new BuyItemCommand();
            var builder = new BuyItemSingleStepPipelineBuilder(serviceProvider);

            Assert.Throws <InvalidOperationException>(() => builder.CreatePipeline(command));
        }
        public void CreatePipeline_StepWithSingleDependency_ResolvesStepWithServiceProvider()
        {
            var serviceProvider = new ServiceCollection()
                                  .AddTransient <ICustomService, CustomService>()
                                  .AddTransient <StepWithSingleDependency>()
                                  .BuildServiceProvider();

            var command  = new BuyItemCommand();
            var builder  = new BuyItemSingleStepPipelineBuilder(serviceProvider);
            var pipeline = builder.CreatePipeline(command);

            Assert.IsNotNull(pipeline);
        }