public void SemVer2PackageVersionMeansSemVer2(string packageVersion, bool isSemVer2) { var leaf = new PackageDetailsCatalogLeaf { PackageVersion = packageVersion, VerbatimVersion = "1.0.0", }; var actual = leaf.IsSemVer2(); Assert.Equal(isSemVer2, actual); }
public void AllowsNullDependencyGroups() { var leaf = new PackageDetailsCatalogLeaf { PackageVersion = "1.0.0", VerbatimVersion = "1.0.0", }; var actual = leaf.IsSemVer2(); Assert.False(actual); }
public void SemVer2DependencyVersionRangeMeansSemVer2(string range, bool isSemVer2) { var leaf = new PackageDetailsCatalogLeaf { PackageVersion = "1.0.0", VerbatimVersion = "1.0.0", DependencyGroups = new List <PackageDependencyGroup> { new PackageDependencyGroup { Dependencies = new List <PackageDependency> { new PackageDependency { Range = "0.0.0", }, }, }, new PackageDependencyGroup { Dependencies = new List <PackageDependency> { new PackageDependency { Range = "0.0.1", }, new PackageDependency { Range = range, }, }, }, }, }; var actual = leaf.IsSemVer2(); Assert.Equal(isSemVer2, actual); }
public void AllowsNullVerbatimVersion() { var leaf = new PackageDetailsCatalogLeaf { PackageVersion = "1.0.0", DependencyGroups = new List <PackageDependencyGroup> { new PackageDependencyGroup { Dependencies = new List <PackageDependency> { new PackageDependency { Range = "[1.0.0, )", }, }, }, }, }; var actual = leaf.IsSemVer2(); Assert.False(actual); }