public void GetBuildArtifact_WithBuildArtifactTypeNotFound_IsNull()
 {
     var result = BuildResult.Success(m_BuildPipeline, m_BuildConfiguration);
     BuildArtifacts.Store(result, new[] { new TestBuildArtifactA() });
     Assert.That(File.Exists(BuildArtifacts.GetArtifactPath(m_BuildConfiguration)), Is.True);
     Assert.That(BuildArtifacts.GetBuildArtifact<TestBuildArtifactB>(m_BuildConfiguration), Is.Null);
 }
        public void GetBuildResult_WithoutBuildConfiguration_IsNull()
        {
            BuildArtifacts.Store(BuildResult.Success(m_BuildPipeline, m_BuildConfiguration), new IBuildArtifact[] { });
            var result = BuildArtifacts.GetBuildResult(null);

            Assert.That(result, Is.Null);
        }
 public void GetBuildResult_IsValid()
 {
     BuildArtifacts.Store(BuildResult.Success(m_BuildPipeline, m_BuildConfiguration), new IBuildArtifact[] { });
     var result = BuildArtifacts.GetBuildResult(m_BuildConfiguration);
     Assert.That(result, Is.Not.Null);
     Assert.That(result.Succeeded, Is.True);
 }
 public void GetBuildArtifact_WithoutBuildArtifacts_IsNull()
 {
     var result = BuildResult.Success(m_BuildPipeline, m_BuildConfiguration);
     BuildArtifacts.Store(result, new IBuildArtifact[] { });
     Assert.That(File.Exists(BuildArtifacts.GetArtifactPath(m_BuildConfiguration)), Is.True);
     Assert.That(BuildArtifacts.GetBuildArtifact<TestBuildArtifactA>(m_BuildConfiguration), Is.Null);
 }
        public void GetBuildArtifact_ReturnNull_WithWrongType()
        {
            var result = BuildPipelineResult.Success(m_BuildPipeline, m_BuildSettings);

            BuildArtifacts.Store(result, new[] { new TestArtifacts() });
            Assert.That(BuildArtifacts.GetBuildArtifact <TestArtifacts2>(m_BuildSettings), Is.Null);
        }
        public void GetBuildArtifact()
        {
            var result = BuildPipelineResult.Success(m_BuildPipeline, m_BuildSettings);

            BuildArtifacts.Store(result, new[] { new TestArtifacts() });
            Assert.That(BuildArtifacts.GetBuildArtifact <TestArtifacts>(m_BuildSettings), Is.Not.Null);
        }
Example #7
0
        public void GetBuildArtifact_IsValid()
        {
            var result = BuildPipelineResult.Success(m_BuildPipeline, m_BuildConfiguration);

            BuildArtifacts.Store(result, new[] { new TestArtifactA() });
            Assert.That(File.Exists(BuildArtifacts.GetArtifactPath(m_BuildConfiguration)), Is.True);
            Assert.That(BuildArtifacts.GetBuildArtifact <TestArtifactA>(m_BuildConfiguration), Is.Not.Null);
        }
        public void GetBuildResult()
        {
            BuildArtifacts.Store(BuildPipelineResult.Success(m_BuildPipeline, m_BuildSettings), new IBuildArtifact[] { });

            var result = BuildArtifacts.GetBuildResult(m_BuildSettings);

            Assert.That(result, Is.Not.Null);
            Assert.That(result.Succeeded, Is.True);
        }
        public void GetBuildArtifact_FileDeleted_IsNull()
        {
            var result = BuildResult.Success(m_BuildPipeline, m_BuildConfiguration);
            BuildArtifacts.Store(result, new[] { new TestBuildArtifactA() });

            var artifactPath = BuildArtifacts.GetArtifactPath(m_BuildConfiguration);
            Assert.That(File.Exists(artifactPath), Is.True);

            File.Delete(artifactPath);
            Assert.That(BuildArtifacts.GetBuildArtifact<TestBuildArtifactA>(m_BuildConfiguration), Is.Null);
        }
        public void Store_WithoutBuildArtifactsArray_Throws()
        {
            var result = BuildResult.Success(m_BuildPipeline, m_BuildConfiguration);

            Assert.Throws <ArgumentNullException>(() => BuildArtifacts.Store(result, null));
        }
 public void Store_WithoutBuildResult_Throws()
 {
     Assert.Throws <ArgumentNullException>(() => BuildArtifacts.Store(null, new IBuildArtifact[] { }));
 }
        public void Store_Throws_WhenNullArtifactsPassed()
        {
            var result = BuildPipelineResult.Success(m_BuildPipeline, m_BuildSettings);

            Assert.Throws <ArgumentNullException>(() => BuildArtifacts.Store(result, null));
        }
 public void Store_Throws_WhenNullResultPassed()
 {
     Assert.Throws <ArgumentNullException>(() => BuildArtifacts.Store(null, new IBuildArtifact[] { }));
 }