public void InvalidVersionString(string input) { TestDelegate testDelegate = new TestDelegate(() => { var semver = new SematicVersion(input); }); Assert.Catch(testDelegate); }
public int Compare(string a, string b) { var sem1 = new SematicVersion(a); var sem2 = new SematicVersion(b); int result_a = sem1.CompareTo(sem2); int result_b = sem2.CompareTo(sem1); if (result_a == 0) { Assert.Zero(result_b); } else { Assert.AreEqual(result_a * -1, result_b); } return(result_a); }
public void ValidVersionString(string input) { var semver = new SematicVersion(input); Assert.AreEqual(input, semver.ToString()); }