Ejemplo n.º 1
0
        public void AvailableVersionCompareCurrentTest()
        {
            NuGetVersion currentVersion = new NuGetVersion(
                VersionInfo.CurrentVersion.Major,
                VersionInfo.CurrentVersion.Minor,
                VersionInfo.CurrentVersion.Patch,
                VersionInfo.CurrentVersion.Revision,
#pragma warning disable CS0436 // Type conflicts with imported type
                ThisAssembly.IsPublicRelease ? VersionInfo.CurrentVersion.ReleaseLabels :
#pragma warning restore CS0436 // Type conflicts with imported type
                VersionInfo.CurrentVersion.ReleaseLabels.Concat(new string[] { "g" + VersionInfo.CurrentVersion.Metadata }), string.Empty);

            Assert.IsNull(VersionInfo.GetBestAvailableVersion(new NuGetVersion[] { currentVersion }, true));
        }