public void CompatibilityTable_NearestFound()
        {
            var net45 = NuGetFramework.Parse("net45");
            var net40 = NuGetFramework.Parse("net40");

            var all = new NuGetFramework[] { net45, net40 };

            CompatibilityTable table = new CompatibilityTable(all);

            Assert.Equal(net45, table.GetNearest(net45).Single());
            Assert.Equal(net40, table.GetNearest(net40).Single());
        }
        public void CompatibilityTable_NearestSingle()
        {
            var net49 = NuGetFramework.Parse("net49");
            var net35 = NuGetFramework.Parse("net35");
            var net45 = NuGetFramework.Parse("net45");
            var net40 = NuGetFramework.Parse("net40");

            var all = new NuGetFramework[] { net45, net40 };

            CompatibilityTable table = new CompatibilityTable(all);

            Assert.Equal(net45, table.GetNearest(net49).Single());
            Assert.Null(table.GetNearest(net35).SingleOrDefault());
        }
        public void CompatibilityTable_NearestNotFound()
        {
            var net45 = NuGetFramework.Parse("net45");
            var net40 = NuGetFramework.Parse("net40");
            var wp8   = NuGetFramework.Parse("wp8");

            var all = new NuGetFramework[] { net45, net40 };

            CompatibilityTable table = new CompatibilityTable(all);

            Assert.Null(table.GetNearest(wp8).SingleOrDefault());
        }