コード例 #1
0
        public void GivenAPackageDidNotResolveToTheMinimumVerifyMessage()
        {
            var range      = VersionRange.Parse("1.0.0");
            var parent     = new LibraryIdentity("a", NuGetVersion.Parse("9.0.0"), LibraryType.Package);
            var child      = new LibraryIdentity("b", NuGetVersion.Parse("2.0.0"), LibraryType.Package);
            var dependency = new ResolvedDependencyKey(parent, range, child);

            var log = UnexpectedDependencyMessages.GetMissingLowerBoundMessage(dependency);

            log.Code.Should().Be(NuGetLogCode.NU1603);
            log.Message.Should().Be("a 9.0.0 depends on b (>= 1.0.0) but b 1.0.0 was not found. An approximate best match of b 2.0.0 was resolved.");
        }
コード例 #2
0
        public void GivenADependencyHasNoLowerBoundVerifyMessage()
        {
            var range      = VersionRange.Parse("(, 5.0.0]");
            var parent     = new LibraryIdentity("a", NuGetVersion.Parse("9.0.0"), LibraryType.Package);
            var child      = new LibraryIdentity("b", NuGetVersion.Parse("2.0.0"), LibraryType.Package);
            var dependency = new ResolvedDependencyKey(parent, range, child);

            var log = UnexpectedDependencyMessages.GetMissingLowerBoundMessage(dependency);

            log.Code.Should().Be(NuGetLogCode.NU1602);
            log.Message.Should().Be("a 9.0.0 does not provide an inclusive lower bound for dependency b (<= 5.0.0). An approximate best match of b 2.0.0 was resolved.");
        }