public void Dependency_HasUnresolvedDependency()
        {
            var dependencyModel = new TestDependencyModel {
                ProviderType = "providerType", Id = "someId1", Resolved = true
            };

            var mockSnapshot = ITargetedDependenciesSnapshotFactory.ImplementHasUnresolvedDependency(@"tfm1\providerType\someid1", hasUnresolvedDependency: true);

            var dependency = new Dependency(dependencyModel, new TargetFramework("tfm1"), @"C:\Foo\Project.csproj");

            Assert.True(dependency.HasUnresolvedDependency(mockSnapshot));
            Assert.True(dependency.IsOrHasUnresolvedDependency(mockSnapshot));
        }
Example #2
0
        public void Dependency_HasUnresolvedDependency()
        {
            var mockModel1 = IDependencyModelFactory.Implement(
                providerType: "providerType",
                id: "someId1",
                resolved: true);

            var mockSnapshot = ITargetedDependenciesSnapshotFactory.ImplementHasUnresolvedDependency(@"tfm1\providerType\someid1", hasUnresolvedDependency: true);

            var dependency = new Dependency(mockModel1, ITargetFrameworkFactory.Implement("tfm1"), @"C:\Foo\Project.csproj");

            Assert.True(dependency.HasUnresolvedDependency(mockSnapshot));
            Assert.True(dependency.IsOrHasUnresolvedDependency(mockSnapshot));
        }