public void AddHtmlDevice_InvalidEventTriggerType_Failure() { var res = NotificationDevice.AddHtmlDevice(_connectionServer, "objectid", "templateid", "device name", "*****@*****.**", "bogusevent", false); Assert.IsFalse(res.Success, "Calling AddHtmlDevice with bogus device trigger type did not fail"); }
public void NotificationDevice_AddHtmlDevice() { List <NotificationTemplate> oHtmlTemplates; var res = NotificationTemplate.GetNotificationTemplates(_connectionServer, out oHtmlTemplates, 1, 1); Assert.IsTrue(res.Success, "Failed to fetch notification templates:" + res); Assert.IsTrue(oHtmlTemplates.Count > 0, "No HTML templates found"); string strDisplayName = Guid.NewGuid().ToString(); res = NotificationDevice.AddHtmlDevice(_connectionServer, _tempUser.ObjectId, oHtmlTemplates[0].NotificationTemplateId, strDisplayName, "*****@*****.**", "NewVoiceMail", true); Assert.IsTrue(res.Success, "Failed to create new HTML notification device:" + res); NotificationDevice oDevice; res = NotificationDevice.GetNotificationDevice(_connectionServer, _tempUser.ObjectId, "", strDisplayName, out oDevice); Assert.IsTrue(res.Success, "Failed to fetch newly created HTML notification device:" + res); res = oDevice.Delete(); Assert.IsTrue(res.Success, "Failed to delete new HTML notification device:" + res); }
public void AddHtmlDevice_EmptyAddress_Failure() { var res = NotificationDevice.AddHtmlDevice(_mockServer, "objectid", "templateid", "device name", "", "event", false); Assert.IsFalse(res.Success, "Calling AddHtmlDevice with empty address did not fail"); }
public void AddHtmlDevice_NullConnectionServer_Failure() { var res = NotificationDevice.AddHtmlDevice(null, "objectid", "templateid", "device name", "*****@*****.**", "event", false); Assert.IsFalse(res.Success, "Calling AddHtmlDevice with null Connection server did not fail"); }