Skip to content

Commit

Permalink
Revert "[TFM Display] Create model for badges and table from compatib…
Browse files Browse the repository at this point in the history
…le frameworks. (#8881)"

This reverts commit 33035da.
  • Loading branch information
agr committed Nov 20, 2021
1 parent 33035da commit 51e149b
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 514 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ public ISet<NuGetFramework> GetCompatibleFrameworks(IEnumerable<NuGetFramework>
{
allCompatibleFrameworks.UnionWith(compatibleFrameworks);
}
else
{
allCompatibleFrameworks.Add(packageFramework);
}
}

return allCompatibleFrameworks;
Expand Down
17 changes: 0 additions & 17 deletions src/NuGetGallery.Core/Frameworks/FrameworkProductNames.cs

This file was deleted.

25 changes: 0 additions & 25 deletions src/NuGetGallery.Core/Frameworks/PackageFrameworkCompatibility.cs

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

16 changes: 8 additions & 8 deletions src/NuGetGallery.Core/Frameworks/SupportedFrameworks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ public static class SupportedFrameworks
public static readonly NuGetFramework MonoTouch = new NuGetFramework(FrameworkIdentifiers.MonoTouch, EmptyVersion);
public static readonly NuGetFramework MonoMac = new NuGetFramework(FrameworkIdentifiers.MonoMac, EmptyVersion);
public static readonly NuGetFramework Net48 = new NuGetFramework(FrameworkIdentifiers.Net, new Version(4, 8, 0, 0));
public static readonly NuGetFramework Net50Windows = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version5, "windows", EmptyVersion);
public static readonly NuGetFramework Net60Android = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "android", EmptyVersion);
public static readonly NuGetFramework Net60Ios = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "ios", EmptyVersion);
public static readonly NuGetFramework Net60MacOs = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "macos", EmptyVersion);
public static readonly NuGetFramework Net60MacCatalyst = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "maccatalyst", EmptyVersion);
public static readonly NuGetFramework Net60Tizen = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "tizen", EmptyVersion);
public static readonly NuGetFramework Net60TvOs = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "tvos", EmptyVersion);
public static readonly NuGetFramework Net60Windows = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "windows", EmptyVersion);
public static readonly NuGetFramework Net50Windows = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version5, "windows");
public static readonly NuGetFramework Net60Android = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "android");
public static readonly NuGetFramework Net60Ios = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "ios");
public static readonly NuGetFramework Net60MacOs = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "macos");
public static readonly NuGetFramework Net60MacCatalyst = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "maccatalyst");
public static readonly NuGetFramework Net60Tizen = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "tizen");
public static readonly NuGetFramework Net60TvOs = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "tvos");
public static readonly NuGetFramework Net60Windows = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "windows");
public static readonly NuGetFramework NetCore = new NuGetFramework(FrameworkIdentifiers.NetCore, EmptyVersion);
public static readonly NuGetFramework NetMf = new NuGetFramework(FrameworkIdentifiers.NetMicro, EmptyVersion);
public static readonly NuGetFramework UAP = new NuGetFramework(FrameworkIdentifiers.UAP, EmptyVersion);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,18 @@ public void EmptyPackageFrameworksReturnsEmptySet()
{
var result = _service.GetCompatibleFrameworks(new List<NuGetFramework>());

Assert.Empty(result);
Assert.Equal(expected: 0, actual: result.Count);
}

[Fact]
public void UnknownSupportedPackageReturnsSetWithSameFramework()
public void UnknownSupportedPackageReturnsEmptySet()
{
var framework = NuGetFramework.Parse("net45-client");
var framework = NuGetFramework.Parse("netstandard9.2");
var frameworks = new List<NuGetFramework>() { framework };
var compatible = _service.GetCompatibleFrameworks(frameworks);

Assert.False(framework.IsUnsupported);
Assert.Equal(expected: 1, compatible.Count);
Assert.Contains(framework, compatible);
Assert.Equal(expected: 0, compatible.Count);
}

[Theory]
Expand Down
Loading

0 comments on commit 51e149b

Please sign in to comment.