public void TestBasicMajorMinorPatchVersion() { SemverVersionTestHelper.AssertVersionsEqual( 1, 2, 3, null, null, SemverVersion.Parse("1.2.3")); }
public void TestPreReleaseHyphenatedIdentifier() { SemverVersionTestHelper.AssertVersionsEqual( 1, 2, 3, "alpha-2.1", null, SemverVersion.Parse("1.2.3-alpha-2.1")); }
public void TestBuildMetadataOnly() { SemverVersionTestHelper.AssertVersionsEqual( 1, 0, 0, null, "20130313144700", SemverVersion.Parse("1.0.0+20130313144700")); }
public void ReadNameAndVersion() { var pkgJson = LoadFrom(PkgSimple); dynamic json = JsonConvert.DeserializeObject(PkgSimple); Assert.AreEqual(json.name.ToString(), pkgJson.Name, "Mismatched package names."); Assert.AreEqual(json.version.ToString(), pkgJson.Version.ToString(), "Mismatched version strings."); SemverVersionTestHelper.AssertVersionsEqual(0, 1, 0, null, null, pkgJson.Version); }
public void TestPreReleaseAndBuildMetadata() { // 1.0.0-alpha+001, 1.0.0+20130313144700, 1.0.0-beta+exp.sha.5114f85 SemverVersionTestHelper.AssertVersionsEqual(1, 0, 0, "alpha", "001", SemverVersion.Parse("1.0.0-alpha+001")); SemverVersionTestHelper.AssertVersionsEqual( 1, 0, 0, "beta", "exp.sha.5114f85", SemverVersion.Parse("1.0.0-beta+exp.sha.5114f85")); }
public void TestPreReleaseHyphenatedIdentifierWithoutVersion() { // This version code is crazy, and for that reason it fail when // regional settings is set to Turkish. SemverVersionTestHelper.AssertVersionsEqual( 0, 1, 4, "DEPRECATED-USE-cfenv-INSTEAD", null, SemverVersion.Parse("0.1.4-DEPRECATED-USE-cfenv-INSTEAD")); }
public void TestNumericPreRelease() { SemverVersionTestHelper.AssertVersionsEqual(1, 2, 3, "4.5.6", null, SemverVersion.Parse("1.2.3-4.5.6")); }
public void TestAlphaPreRelease() { SemverVersionTestHelper.AssertVersionsEqual(1, 2, 3, "alpha", null, SemverVersion.Parse("1.2.3-alpha")); }