Example #1
0
        public void AddInterviewHandler_EmptyObjectId_Failure()
        {
            InterviewHandler oInterviewer;
            var res = InterviewHandler.AddInterviewHandler(_mockServer, "", "bogus", "", null, out oInterviewer);

            Assert.IsFalse(res.Success, "Calling static method AddInterviewHandler did not fail with: empty objectid ");
        }
Example #2
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());
        }
        public void AddInterviewHandler_Failure()
        {
            InterviewHandler oHandler;
            WebCallResult    res = InterviewHandler.AddInterviewHandler(_connectionServer, "test" + Guid.NewGuid(), "",
                                                                        "bogus", null, out oHandler);

            Assert.IsFalse(res.Success, "Passing invalid recipient objectId did not result in failure on create");
        }
Example #4
0
        public void AddInterviewHandler_NullConnectionServer_Failure()
        {
            InterviewHandler oInterviewer;

            var res = InterviewHandler.AddInterviewHandler(null, "display name", "", "", null, out oInterviewer);

            Assert.IsFalse(res.Success,
                           "Calling static method AddInterviewHandler did not fail with: null ConnectionServer");
        }
Example #5
0
        public new static void MyClassInitialize(TestContext testContext)
        {
            BaseIntegrationTests.MyClassInitialize(testContext);

            List <UserBase> tempUser;

            UserBase.GetUsers(_connectionServer, out tempUser, 1, 1);

            string strAlias = "TempInterviewer_" + Guid.NewGuid().ToString().Replace("-", "");
            var    res      = InterviewHandler.AddInterviewHandler(_connectionServer, strAlias, tempUser[0].ObjectId, "", null, out _tempInterviewer);

            Assert.IsTrue(res.Success, "Failed creating temporary interviewer:" + res.ToString());
        }
        public new static void MyClassInitialize(TestContext testContext)
        {
            BaseIntegrationTests.MyClassInitialize(testContext);

            //grab the first user in the directory to use as a recipient
            List <UserBase> oUsers;
            WebCallResult   res = UserBase.GetUsers(_connectionServer, out oUsers, 1, 1);

            Assert.IsTrue(res.Success, "Failed fetching user as recipient for creating temporary interview handler:" + res);

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

            res = InterviewHandler.AddInterviewHandler(_connectionServer, strName, oUsers[0].ObjectId, "", null, out _tempHandler);
            Assert.IsTrue(res.Success, "Failed creating temporary interview handler:" + res.ToString());
        }