Example #1
0
        public void NotificationDevice_AddPagerDevice()
        {
            var res = NotificationDevice.AddPagerDevice(_connectionServer, _tempUser.ObjectId, Guid.NewGuid().ToString(),
                                                        _tempUser.MediaSwitchObjectId, "234234", "NewUrgentFax", false);

            Assert.IsTrue(res.Success, "Failed to create new pager notification device");
        }
Example #2
0
        public void AddPagerDevice_InvalidEventTriggerType_Failure()
        {
            var res = NotificationDevice.AddPagerDevice(_connectionServer, "objectid", "devicename", "mediaswitchid", "234234",
                                                        "bogusevent", true);

            Assert.IsFalse(res.Success, "Calling AddPagerDevice with invalid eventID did not fail");
        }
        public void AddPagerDevice_EmptyPhoneNumber_Failure()
        {
            var res = NotificationDevice.AddPagerDevice(_mockServer, "objectid", "devicename", "mediaswitchid", "",
                                                        "event", true);

            Assert.IsFalse(res.Success, "Calling AddPagerDevice with empty phone number did not fail");
        }
        public void AddPagerDevice_EmptyMediaSwitchId_Failure()
        {
            var res = NotificationDevice.AddPagerDevice(_mockServer, "objectid", "devicename", "", "234234",
                                                        "event", true);

            Assert.IsFalse(res.Success, "Calling AddPagerDevice with empty mediaswitchid did not fail");
        }
        public void AddPagerDevice_NullConnectionServer_Failure()
        {
            var res = NotificationDevice.AddPagerDevice(null, "objectid", "devicename", "mediaswitchid", "234234",
                                                        "event", true);

            Assert.IsFalse(res.Success, "Calling AddPagerDevice with null Connection server did not fail");
        }
Example #6
0
        public void NotificationDevice_PagerDevice_AddEditDelete_Success()
        {
            var oNotificationDevice = HelperGetPhoneNotificationDevice();

            var res = NotificationDevice.AddPagerDevice(_connectionServer, _tempUser.ObjectId, "NewPagerDevice", oNotificationDevice.MediaSwitchObjectId,
                                                        "12345", NotificationEventTypes.NewUrgentVoiceMail.ToString(), true);

            Assert.IsTrue(res.Success, "Failed to add new Pager notification device:" + res.ToString());
            Assert.IsTrue(res.ReturnedObjectId.Length > 0, "Empty objectID returned for new Pager device creation");

            res = _tempUser.GetNotificationDevice("blah", out oNotificationDevice);
            Assert.IsFalse(res.Success, "Invalid notification device name should result in an error");

            res = _tempUser.GetNotificationDevice("NewPagerDevice", out oNotificationDevice, true);
            Assert.IsTrue(res.Success, "Failed to fetch newly created pager notification device");

            res = oNotificationDevice.Delete();
            Assert.IsTrue(res.Success, "Failed removing newly added Pager notification device:" + res.ToString());
        }