public void ValidationPassesForValidTimes() { TimeValidator validator = new TimeValidator(); Assert.IsTrue(validator.IsValid(this, "00:00")); Assert.IsTrue(validator.IsValid(this, "23:59")); }
public void ValidationFailsForInvalidTimes() { TimeValidator validator = new TimeValidator(); Assert.IsFalse(validator.IsValid(this, "24:00")); Assert.IsFalse(validator.IsValid(this, "00:60")); Assert.IsFalse(validator.IsValid(this, "12")); Assert.IsFalse(validator.IsValid(this, "23:")); Assert.IsFalse(validator.IsValid(this, "abc")); Assert.IsFalse(validator.IsValid(this, ":10")); }