コード例 #1
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());
        }
コード例 #2
0
        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");
        }
コード例 #3
0
        public void AddPostGreetingRecording_EmptyDisplayName_Failure()
        {
            var res = PostGreetingRecording.AddPostGreetingRecording(_mockServer, "");

            Assert.IsFalse(res.Success, "");
        }
コード例 #4
0
        public void AddPostGreetingRecording_NullConnectionServer_Failure()
        {
            WebCallResult res = PostGreetingRecording.AddPostGreetingRecording(null, "displayname");

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