Esempio n. 1
0
        public void GivenASourceInfoWithNoVersionsVerifyOutputString()
        {
            var range      = VersionRange.Parse("2.0.0");
            var sourceInfo = new KeyValuePair <PackageSource, SortedSet <NuGetVersion> >(
                key: new PackageSource("http://nuget.org/a/"),
                value: new SortedSet <NuGetVersion>());

            var s = UnresolvedMessages.FormatSourceInfo(sourceInfo, range);

            s.Should().Be("Found 0 version(s) in http://nuget.org/a/");
        }
Esempio n. 2
0
        public void GivenASourceInfoVerifyFullFormatting()
        {
            var range      = VersionRange.Parse("2.0.0");
            var sourceInfo = new KeyValuePair <PackageSource, SortedSet <NuGetVersion> >(
                key: new PackageSource("http://nuget.org/a/"),
                value: new SortedSet <NuGetVersion>()
            {
                NuGetVersion.Parse("1.0.0")
            });

            var s = UnresolvedMessages.FormatSourceInfo(sourceInfo, range);

            s.Should().Be("Found 1 version(s) in http://nuget.org/a/ [ Nearest version: 1.0.0 ]");
        }