public void ShouldReturnFalseForInvalidVersionStrings() { string[] stringsToTest = { "", " ", "a", "a.b", "1,000", "1.0.3-alpha", "1.0. " }; foreach (var s in stringsToTest) { Assert.IsFalse(PackageConstraintExtensions.IsValidVersionString(s)); } }
public void ShouldReturnTrueForValidVersionStrings() { string[] stringsToTest = { "0", "0.1", "1.0.0", "0.0.0.0", "1.2" }; foreach (var s in stringsToTest) { Assert.IsTrue(PackageConstraintExtensions.IsValidVersionString(s)); } }