public void GetPostGreetingRecording_MissingObjectIdAndName_Failure()
        {
            PostGreetingRecording oGreeting;
            var res = PostGreetingRecording.GetPostGreetingRecording(out oGreeting, _connectionServer);

            Assert.IsFalse(res.Success, "Calling GetPostGreetingRecording with missing ObjectId and nane did not fail");
        }
Пример #2
0
        public void GetPostGreetingRecording_EmptyObjectIdAndName_Failure()
        {
            PostGreetingRecording oGreeting;
            var res = PostGreetingRecording.GetPostGreetingRecording(out oGreeting, _mockServer);

            Assert.IsFalse(res.Success, "");
        }
Пример #3
0
        public new static void MyClassInitialize(TestContext testContext)
        {
            BaseIntegrationTests.MyClassInitialize(testContext);

            _connectionServer.ErrorEvents += ServerOnErrorEvents;

            //create new list with GUID in the name to ensure uniqueness
            String strAlias = "TempUserServerResp_" + Guid.NewGuid().ToString().Replace("-", "");

            //generate a random number and tack it onto the end of some zeros so we're sure to avoid any legit numbers on the system.
            Random random       = new Random();
            int    iExtPostfix  = random.Next(100000, 999999);
            string strExtension = "000000" + iExtPostfix.ToString();

            //use a bogus extension number that's legal but non dialable to avoid conflicts
            var res = UserBase.AddUser(_connectionServer, "voicemailusertemplate", strAlias, strExtension, null, out _tempUser);

            Assert.IsTrue(res.Success, "Failed creating temporary user:"******"TempContactJsn_" + Guid.NewGuid().ToString().Replace("-", "");
            res      = Contact.AddContact(_connectionServer, "systemcontacttemplate", strAlias, "", "", strAlias, null, out _tempContact);
            Assert.IsTrue(res.Success, "Failed creating temporary contact:" + res.ToString());

            strAlias = "TempInterviewer_" + Guid.NewGuid().ToString().Replace("-", "");
            res      = InterviewHandler.AddInterviewHandler(_connectionServer, strAlias, _tempUser.ObjectId, "", null, out _tempInterviewer);
            Assert.IsTrue(res.Success, "Failed creating temporary interviewer:" + res.ToString());

            strAlias = "TempRecording_" + Guid.NewGuid().ToString().Replace("-", "");
            res      = PostGreetingRecording.AddPostGreetingRecording(_connectionServer, strAlias, out _tempRecording);
            Assert.IsTrue(res.Success, "Failed creating temporary post greeting recording:" + res.ToString());
        }
Пример #4
0
        public void GetPostGreetingRecording_NullconnectionServer_Failure()
        {
            PostGreetingRecording oGreeting;
            var res = PostGreetingRecording.GetPostGreetingRecording(out oGreeting, null, "objectID");

            Assert.IsFalse(res.Success, "");
        }
        public void GetPostGreetingRecording_InvalidObjectId_Failure()
        {
            PostGreetingRecording oGreeting;
            var res = PostGreetingRecording.GetPostGreetingRecording(out oGreeting, _connectionServer, "objectID");

            Assert.IsFalse(res.Success, "Calling GetPostGreetingRecording with invalid ObjectId did not fail");
        }
Пример #6
0
        public void GetPostGreetingRecordings_NullConnectionServer_Failure()
        {
            List <PostGreetingRecording> oGreetings;
            var res = PostGreetingRecording.GetPostGreetingRecordings(null, out oGreetings, 1, 10);

            Assert.IsFalse(res.Success, "");
        }
        public void GetPostGreetingRecordings_ConstructorWithObjectId_Success()
        {
            PostGreetingRecording oGreeting;
            var res = PostGreetingRecording.GetPostGreetingRecording(out oGreeting, _connectionServer,
                                                                     _tempGreeting.ObjectId);

            Assert.IsTrue(res.Success, "Failed to fetch post greeting recording by valid objectId:" + res);
        }
        public void GetPostGreetingRecordings_Success()
        {
            List <PostGreetingRecording> oGreetings;
            WebCallResult res = PostGreetingRecording.GetPostGreetingRecordings(_connectionServer, out oGreetings, 1, 2);

            Assert.IsTrue(res.Success, "Failed to fetch post greeting recordings:" + res);
            Assert.IsTrue(oGreetings.Count > 0, "No post greeting recordings returned on fetch");
        }
Пример #9
0
        public void PostGreetingRecording_Test()
        {
            _errorString = "";
            List <PostGreetingRecording> oPostGreetingRecordings;
            var res = PostGreetingRecording.GetPostGreetingRecordings(_connectionServer, out oPostGreetingRecordings);

            Assert.IsTrue(res.Success & oPostGreetingRecordings.Count > 0, "Failed to fetch postgreetingrecordings:" + res);
            Assert.IsTrue(string.IsNullOrEmpty(_errorString), _errorString);
        }
        public void GetPostGreetingRecordings_ConstructorWithDisplayName_Success()
        {
            PostGreetingRecording oGreeting;

            var res = PostGreetingRecording.GetPostGreetingRecording(out oGreeting, _connectionServer, "", _tempGreeting.DisplayName);

            Assert.IsTrue(res.Success, "Failed to fetch post greeting recording by valid name:" + res);

            Console.WriteLine(oGreeting);
            Console.WriteLine(oGreeting.DumpAllProps());
        }
        public new static void MyClassInitialize(TestContext testContext)
        {
            BaseIntegrationTests.MyClassInitialize(testContext);

            //create new greeting with GUID in the name to ensure uniqueness
            String strName = "TempGreeting_" + Guid.NewGuid().ToString().Replace("-", "");

            WebCallResult res = PostGreetingRecording.AddPostGreetingRecording(_connectionServer, strName, out _tempGreeting);

            Assert.IsTrue(res.Success, "Failed creating temporary interview handler:" + res.ToString());
            Assert.IsNotNull(_tempGreeting, "Null temorary greeting passed back");
        }
Пример #12
0
        public void AddEditDeleteCallHandler_SetPostGreetingRecording()
        {
            List <PostGreetingRecording> oRecordings;
            var res = PostGreetingRecording.GetPostGreetingRecordings(_connectionServer, out oRecordings, 1, 1);

            Assert.IsTrue(res.Success, "Failed to fetch recordings:" + res);
            Assert.IsTrue(oRecordings.Count == 1, "Failed to fetch single recording");

            _tempHandler.ClearPendingChanges();
            _tempHandler.PostGreetingRecordingObjectId = oRecordings[0].ObjectId;
            res = _tempHandler.Update();
            Assert.IsTrue(res.Success, "Failed to update handler to postgreeting recording:" + res);
        }
Пример #13
0
        public void Constructor_NullConnectionServer_Failure()
        {
            PostGreetingRecording oTest = new PostGreetingRecording(null);

            Console.WriteLine(oTest);
        }
Пример #14
0
        public void AddPostGreetingRecording_EmptyDisplayName_Failure()
        {
            var res = PostGreetingRecording.AddPostGreetingRecording(_mockServer, "");

            Assert.IsFalse(res.Success, "");
        }
Пример #15
0
        public void AddPostGreetingRecording_NullConnectionServer_Failure()
        {
            WebCallResult res = PostGreetingRecording.AddPostGreetingRecording(null, "displayname");

            Assert.IsFalse(res.Success, "");
        }
Пример #16
0
        public void UpdatePostGreetingRecording_EmptyDisplayName_Failure()
        {
            var res = PostGreetingRecording.UpdatePostGreetingRecording(_mockServer, "objectid", "");

            Assert.IsFalse(res.Success, "");
        }
Пример #17
0
        public void UpdatePostGreetingRecording_EmptyObjectId_Failure()
        {
            var res = PostGreetingRecording.UpdatePostGreetingRecording(_mockServer, "", "display name");

            Assert.IsFalse(res.Success, "");
        }
Пример #18
0
        public void UpdatePostGreetingRecording_NullConnectionServer_Failure()
        {
            var res = PostGreetingRecording.UpdatePostGreetingRecording(null, "objectid", "display name");

            Assert.IsFalse(res.Success, "");
        }
        public void DeletePostGreetingRecording_InvalidObjectId_Failure()
        {
            var res = PostGreetingRecording.DeletePostGreetingRecording(_connectionServer, "objectID");

            Assert.IsFalse(res.Success, "Calling DeletePostGreetingRecording with invalid ObjectId did not fail");
        }
Пример #20
0
        public void SetPostGreetingRecordingToStreamFile_NullConnectionServer_Failure()
        {
            var res = PostGreetingRecording.SetPostGreetingRecordingToStreamFile(null, "streamid", "objectid", 1033);

            Assert.IsFalse(res.Success, "");
        }
        public void UpdatePostGreetingRecording_InvalidObjectId_Failure()
        {
            var res = PostGreetingRecording.UpdatePostGreetingRecording(_connectionServer, "objectid", "display name");

            Assert.IsFalse(res.Success, "calling UpdatePostGreetingRecording with invalid ObjectId did not fail");
        }
Пример #22
0
        public void SetPostGreetingRecordingWavFile_EmptyWavFilePath_Failure()
        {
            var res = PostGreetingRecording.SetPostGreetingRecordingWavFile(_mockServer, "", "objectid", 1033, true);

            Assert.IsFalse(res.Success, "");
        }
Пример #23
0
        public void DeletePostGreetingRecording_NullConnectionServer_Failure()
        {
            var res = PostGreetingRecording.DeletePostGreetingRecording(null, "objectID");

            Assert.IsFalse(res.Success, "");
        }
Пример #24
0
        public void SetPostGreetingRecordingToStreamFile_EmptyObjectId_Failure()
        {
            var res = PostGreetingRecording.SetPostGreetingRecordingToStreamFile(_mockServer, "streamid", "", 1033);

            Assert.IsFalse(res.Success, "");
        }
Пример #25
0
        public void DeletePostGreetingRecording_EmptyObjectId_Failure()
        {
            var res = PostGreetingRecording.DeletePostGreetingRecording(_mockServer, "");

            Assert.IsFalse(res.Success, "");
        }
        public void Constructor_InvalidName_Failure()
        {
            PostGreetingRecording oTest = new PostGreetingRecording(_connectionServer, "", "bogus");

            Console.WriteLine(oTest);
        }
Пример #27
0
        public void SetPostGreetingRecordingWavFile_InvalidWavFile_Failure()
        {
            var res = PostGreetingRecording.SetPostGreetingRecordingWavFile(_mockServer, "bogus.xyz", "objectid", 1033, true);

            Assert.IsFalse(res.Success, "");
        }
        public void SetPostGreetingRecordingToStreamFile_InvalidStreamIdAndObjectId_Failure()
        {
            var res = PostGreetingRecording.SetPostGreetingRecordingToStreamFile(_connectionServer, "streamid", "objectid", 1033);

            Assert.IsFalse(res.Success, "Calling SetPostGreetingRecordingToStreamFile with invalid streaId and ObjectId did not fail");
        }
Пример #29
0
        public void SetPostGreetingRecordingWavFile_NullConnectionServer_Failure()
        {
            var res = PostGreetingRecording.SetPostGreetingRecordingWavFile(null, "test.wav", "objectid", 1033, true);

            Assert.IsFalse(res.Success, "");
        }
Пример #30
0
        public void SetPostGreetingRecordingWavFile_EmptyObjectId_Failure()
        {
            var res = PostGreetingRecording.SetPostGreetingRecordingWavFile(_mockServer, "wavcopy.exe", "", 1033, true);

            Assert.IsFalse(res.Success, "");
        }