示例#1
0
 public void TestValidateInvalidHHMMS()
 {
     Time_Off tf = new Time_Off("12345");
     string err = string.Empty;
     string modStr = string.Empty;
     Assert.IsFalse(tf.Validate(out err, out modStr));
     Assert.AreEqual("\tTime must be in HHMM or HHMMSS format.", err);
     Assert.IsNull(modStr);
 }
示例#2
0
 public void TestValidateInvalidHour()
 {
     Time_Off tf = new Time_Off("243456");
     string err = string.Empty;
     string modStr = string.Empty;
     Assert.IsFalse(tf.Validate(out err, out modStr));
     Assert.AreEqual("\tInvalid time.", err);
     Assert.IsNull(modStr);
 }
示例#3
0
 public void TestValidateValidHHMMSS()
 {
     Time_Off tf = new Time_Off("123456");
     string err = string.Empty;
     string modStr = string.Empty;
     Assert.IsTrue(tf.Validate(out err,out modStr));
     Assert.IsNull(err);
     Assert.IsNull(modStr);
 }