예제 #1
0
        public void NotificationDevice_AddPhoneDevice()
        {
            var res = NotificationDevice.AddPhoneDevice(_connectionServer, _tempUser.ObjectId, Guid.NewGuid().ToString(),
                                                        _tempUser.MediaSwitchObjectId, "234234", "NewUrgentVoiceMail", false);

            Assert.IsTrue(res.Success, "Failed to create new phone notification device");
        }
        public void AddPhoneDevice_EmptyPhoneNumber_Failure()
        {
            var res = NotificationDevice.AddPhoneDevice(_mockServer, "objectid", "devicename", "mediaswitchid", "",
                                                        "event", true);

            Assert.IsFalse(res.Success, "Calling AddPhoneDevice with empty phone number did not fail");
        }
예제 #3
0
        public void AddPhoneDevice_InvalidEventTriggerType_Failure()
        {
            var res = NotificationDevice.AddPhoneDevice(_connectionServer, "objectid", "devicename", "mediaswitchid", "234234",
                                                        "bogusevent", true);

            Assert.IsFalse(res.Success, "Calling AddPhoneDevice with invalid media even type trigger did not fail");
        }
        public void AddPhoneDevice_NullConnectionServer_Failure()
        {
            var res = NotificationDevice.AddPhoneDevice(null, "objectid", "devicename", "mediaswitchid", "234234",
                                                        "event", true);

            Assert.IsFalse(res.Success, "Calling AddPhoneDevice with null connection server did not fail");
        }
예제 #5
0
        public void NotificationDevice_PhoneDevice_AddEditDelete_Success()
        {
            var oNotificationDevice = HelperGetPhoneNotificationDevice();

            var res = NotificationDevice.AddPhoneDevice(_connectionServer, _tempUser.ObjectId, "NewPhoneDevice", oNotificationDevice.MediaSwitchObjectId,
                                                        "112233", NotificationEventTypes.NewUrgentVoiceMail.ToString(), true);

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

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

            oNotificationDevice.AfterDialDigits = "123";
            res = oNotificationDevice.Update();
            Assert.IsTrue(res.Success, "Failed updating notification device:" + res.ToString());

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