示例#1
0
 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));
     }
 }
示例#2
0
 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));
     }
 }