예제 #1
0
 public void TestValidateNoNumber()
 {
     My_Fists fists = new My_Fists("Fred is dead");
     string err = string.Empty;
     string modStr = string.Empty;
     Assert.IsFalse(fists.Validate(out err, out modStr));
     Assert.AreEqual("\tFists must start with member's number.", err);
     Assert.IsNull(modStr);
 }
예제 #2
0
 public void TestValidateDecimal2()
 {
     My_Fists fists = new My_Fists("12.34Fred");
     string err = string.Empty;
     string modStr = string.Empty;
     Assert.IsFalse(fists.Validate(out err, out modStr));
     Assert.AreEqual("\tFists number must be digits only.", err);
     Assert.IsNull(modStr);
 }
예제 #3
0
 public void TestValidateNumberOnly()
 {
     My_Fists fists = new My_Fists("1234");
     string err = string.Empty;
     string modStr = string.Empty;
     Assert.IsTrue(fists.Validate(out err, out modStr));
     Assert.IsNull(err);
     Assert.IsNull(modStr);
 }