public void NuGetGroupsToDependencyGroups_ShouldIncludeFrameworkDependencies() { var result = CatalogEntry.ToDependencyGroups(nugetFrameworkDeps, "http://catalog/package.json", GetRegistrationUrl); Assert.All(result, r => Assert.Null(r.Dependencies)); Assert.Equal(new string[] { "netstandard2.0", "net35" }, result.Select(s => s.TargetFramework)); }
public void NuGetGroupsToDependencyGroups_ShouldGroupDependenciesWithoutFrameworkTogether() { var result = CatalogEntry.ToDependencyGroups(nugetAnyFrameworkPackageDeps, "http://catalog/package.json", GetRegistrationUrl); var deps = result.First(); Assert.Equal(new string[] { "dep1", "dep2" }, deps.Dependencies.Select(d => d.Id)); Assert.All(result, r => Assert.Null(r.TargetFramework)); }
public void NuGetGroupsToDependencyGroups_ShouldGroupPerFrameworkDepsTogether() { var result = CatalogEntry.ToDependencyGroups(nugetPackagePerFrameworkDeps, "http://catalog/package.json", GetRegistrationUrl); var netstd2 = result.First(n => n.TargetFramework == "netstandard2.0"); Assert.Equal(new string[] { "dep1", "depX" }, netstd2.Dependencies.Select(d => d.Id)); var net35 = result.First(n => n.TargetFramework == "net35"); Assert.Equal(new string[] { "dep2" }, net35.Dependencies.Select(d => d.Id)); }