public void CanRun_WithInvalidComponents_IsFalse()
        {
            var pipeline = new TestBuildPipelineWithInvalidComponents();
            var config   = BuildConfiguration.CreateInstance();

            Assert.Throws <InvalidOperationException>(() => pipeline.Build(config));
            Assert.That(pipeline.CanRun(config).Result, Is.False);
        }
        public void Build_WithInvalidComponents_Throws()
        {
            var pipeline = new TestBuildPipelineWithInvalidComponents();
            var config   = BuildConfiguration.CreateInstance();

            Assert.Throws <InvalidOperationException>(() => pipeline.CanBuild(config));
            Assert.Throws <InvalidOperationException>(() => pipeline.Build(config));
        }
        public void Run_WithInvalidComponents_Fails()
        {
            var pipeline = new TestBuildPipelineWithInvalidComponents();
            var config   = BuildConfiguration.CreateInstance();

            Assert.Throws <InvalidOperationException>(() => pipeline.Build(config));
            Assert.That(pipeline.CanRun(config).Result, Is.False);
            using (var result = pipeline.Run(config))
            {
                Assert.That(result.Succeeded, Is.False);
            }
        }