public void AlertItemAlertTimeValidationTest() { AlertItem item = new AlertItem(); Assert.IsNotNull(item.AlertTime); Assert.AreEqual("", item.Validate("AlertTime")); item.AlertTime = DateTime.Now; Assert.AreEqual("", item.Validate("AlertTime")); }
public void AlertItemNoticeValidationTest() { AlertItem item = new AlertItem(); Assert.IsNull(item.Notice); Assert.AreNotEqual("", item.Validate("Notice")); item.Notice = "Test Alert"; Assert.AreEqual("", item.Validate("Notice")); }
public void GeneralAlertItemTest() { AlertItem item = new AlertItem(); item.Time = DateTime.Now; item.AlertTime = DateTime.Now.AddHours(1); item.Notice = "Test Alert"; item.HasAlert = false; Assert.AreEqual("", item.Validate()); }