コード例 #1
0
        public void TestThat_ArtifactWithDependencyDetectsCorrectDependency()
        {
            var dependencyHandler = new ArtifactDependencyHandler();
            var settings          = new ConDepSettings {
                Options = { Assembly = GetType().Assembly }
            };

            var artifact = new MyArtifactDependentOnStandardArtifact();

            dependencyHandler.PopulateWithDependencies(artifact, settings);
            Assert.That(artifact.Dependencies.Single(), Is.InstanceOf <MyStandardArtifact1>());
        }
コード例 #2
0
        public void TestThat_ArtifactWithHierarchicalDependenciesReturnsCorrectDependenciesInCorrectOrder()
        {
            var dependencyHandler = new ArtifactDependencyHandler();
            var settings          = new ConDepSettings {
                Options = { Assembly = GetType().Assembly }
            };

            var artifact = new MyArtifactWithHierarchicalDependencies();

            dependencyHandler.PopulateWithDependencies(artifact, settings);
            var dependencies = artifact.Dependencies.ToList();

            Assert.That(dependencies.Count, Is.EqualTo(2));
            Assert.That(dependencies[0], Is.InstanceOf <MyStandardArtifact1>());
            Assert.That(dependencies[1], Is.InstanceOf <MyArtifactDependentOnStandardArtifact>());
        }