public void GetNotificationDevices_EmptyUserObjectId_Failure()
        {
            List <NotificationDevice> oDevices;

            var res = NotificationDevice.GetNotificationDevices(_mockServer, "", out oDevices);

            Assert.IsFalse(res.Success, "Empty UserObjectID should fail.");
        }
Example #2
0
        public void GetNotificationDevices_Success()
        {
            List <NotificationDevice> oDevices;

            //get the notificaiton devices for the operator
            WebCallResult res = NotificationDevice.GetNotificationDevices(_connectionServer, _tempUser.ObjectId, out oDevices);

            Assert.IsTrue(res.Success, "Failed to fetch notification devices for operator:" + res);
        }
        public void GetNotificationDevices_NullConnectionServer_Failure()
        {
            List <NotificationDevice> oDevices;

            //get Notification Device list failure points.
            WebCallResult res = NotificationDevice.GetNotificationDevices(null, "objectid", out oDevices);

            Assert.IsFalse(res.Success, "Null Connection server object should fail");
        }
Example #4
0
        public void NotificationDevice_Test()
        {
            _errorString = "";
            List <NotificationDevice> oNotificationDevices;
            var res = NotificationDevice.GetNotificationDevices(_connectionServer, _tempUser.ObjectId, out oNotificationDevices);

            Assert.IsTrue(res.Success, "Failed to fetch notificationdevice:" + res);
            Assert.IsTrue(string.IsNullOrEmpty(_errorString), _errorString);
        }
Example #5
0
        public void GetNotificationDevices_InvalidObjectId_Success()
        {
            List <NotificationDevice> oDevices;

            var res = NotificationDevice.GetNotificationDevices(_connectionServer, "aaa", out oDevices);

            Assert.IsTrue(res.Success, "Fetching notification devices with invalid name should not fail.");
            Assert.IsFalse(oDevices == null, "Invalid UserObjectID fetch returned null devices list.");
            Assert.IsTrue(oDevices.Count == 0, "Invalid UserObjectID fetch returned one or more devices.");
        }
Example #6
0
        public void GetNotificationDevice_Success()
        {
            NotificationDevice        oDevice;
            List <NotificationDevice> oDevices;

            WebCallResult res = NotificationDevice.GetNotificationDevices(_connectionServer, _tempUser.ObjectId, out oDevices);

            Assert.IsTrue(res.Success, "Failed to fetch notification devices for operator:" + res);

            //fetch the single device returned as the first in the list from the last test
            res = NotificationDevice.GetNotificationDevice(_connectionServer, _tempUser.ObjectId, oDevices.First().ObjectId, "", out oDevice);
            Assert.IsTrue(res.Success, "Failed to fetch notification device for operator:" + res);
        }