Ejemplo n.º 1
0
        public void GivenARangeVerifyProjectsCountAsExactMatches()
        {
            var range      = VersionRange.Parse("( , 1.0.0]");
            var parent     = new LibraryIdentity("a", NuGetVersion.Parse("9.0.0"), LibraryType.Project);
            var child      = new LibraryIdentity("b", NuGetVersion.Parse("2.0.0"), LibraryType.Project);
            var dependency = new ResolvedDependencyKey(parent, range, child);

            UnexpectedDependencyMessages.DependencyRangeHasMissingExactMatch(dependency).Should().BeFalse("Project type should return false, regardless of the range.");
        }
Ejemplo n.º 2
0
        public void GivenARangeVerifyItDoesNotHaveAnExactMatch(string rangeString, string childVersion)
        {
            var range      = VersionRange.Parse(rangeString);
            var parent     = new LibraryIdentity("a", NuGetVersion.Parse("9.0.0"), LibraryType.Package);
            var child      = new LibraryIdentity("b", NuGetVersion.Parse(childVersion), LibraryType.Package);
            var dependency = new ResolvedDependencyKey(parent, range, child);

            UnexpectedDependencyMessages.DependencyRangeHasMissingExactMatch(dependency).Should().BeTrue();
        }