public void GetInterviewHandler_EmptyObjectIdAndDisplayName_Failure() { InterviewHandler oInterviewer; var res = InterviewHandler.GetInterviewHandler(out oInterviewer, _mockServer); Assert.IsFalse(res.Success, "Calling static method GetInterviewHandler did not fail with: empty objectID and display name"); }
public void SetInterviewHandlerVoiceNameToStreamFile_NullConnectionServer_Failure() { var res = InterviewHandler.SetInterviewHandlerVoiceNameToStreamFile(null, "objectid", "streamid"); Assert.IsFalse(res.Success, "Setting interview handler voice name to stream file did not fail with null connection server"); }
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_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 "); }
public void GetInterviewHandler_InvalidObjectId_Failure() { InterviewHandler oInterviewer; var res = InterviewHandler.GetInterviewHandler(out oInterviewer, _connectionServer, "objectId", "DisplayName"); Assert.IsFalse(res.Success, "Calling static method GetInterviewHandler did not fail with: invalid objectId and display name"); }
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"); }
public void GetInterviewHandlers_NullConnectionServer_Failure() { List <InterviewHandler> oHandlers; WebCallResult res = InterviewHandler.GetInterviewHandlers(null, out oHandlers); Assert.IsFalse(res.Success, "Calling static method GetInterviewHandlers did not fail with: null ConnectionServer"); }
public void GetInterviewHandler_NullConnectionServer_Failure() { InterviewHandler oInterviewer; var res = InterviewHandler.GetInterviewHandler(out oInterviewer, null, "objectId", "DisplayName"); Assert.IsFalse(res.Success, "Calling static method GetInterviewHandler did not fail with: null ConnectionServer"); }
public void GetInterviewHandler_BlankObjectIdAndName_Failure() { InterviewHandler oHandler; var res = InterviewHandler.GetInterviewHandler(out oHandler, _mockServer); Assert.IsFalse(res.Success, "GetInterviewHandler should fail if the ObjectId and display name are both blank"); }
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"); }
public void UpdateInterviewHandler_InvalidObjectId_Failure() { ConnectionPropertyList oProps = new ConnectionPropertyList(); oProps.Add("bogus", "bogusvalue"); var res = InterviewHandler.UpdateInterviewHandler(_connectionServer, "ObjectId", oProps); Assert.IsFalse(res.Success, "Calling static method UpdateInterviewHandler did not fail with: invalid objectId"); }
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 void Interviewer_Test() { _errorString = ""; List <InterviewHandler> oInterviewHandlers; var res = InterviewHandler.GetInterviewHandlers(_connectionServer, out oInterviewHandlers, 1, 2); Assert.IsTrue(res.Success & oInterviewHandlers.Count > 0, "Failed to fetch interview handlers:" + res); Assert.IsTrue(string.IsNullOrEmpty(_errorString), "Error parsing Json for interview handlers:" + _errorString); List <InterviewQuestion> oQuestions; res = InterviewQuestion.GetInterviewQuestions(_connectionServer, oInterviewHandlers[0].ObjectId, out oQuestions); Assert.IsFalse(res.Success == false || oQuestions.Count == 0, "Failed to fetch interviewer questions"); Assert.IsTrue(string.IsNullOrEmpty(_errorString), "Error parsing Json for interview handler questions:" + _errorString); }
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()); }
public void GetInterviewHandler_Failure() { InterviewHandler oHandler; WebCallResult res = InterviewHandler.GetInterviewHandler(out oHandler, null); Assert.IsFalse(res.Success, "GetInterviewHandler should fail if the ConnectionServerRest is null"); res = InterviewHandler.GetInterviewHandler(out oHandler, _connectionServer); Assert.IsFalse(res.Success, "GetInterviewHandler should fail if the ObjectId and display name are both blank"); List <InterviewHandler> oList; res = InterviewHandler.GetInterviewHandlers(_connectionServer, out oList, 1, 1); Assert.IsTrue(res.Success, "Failed to fetch list of interviewers:" + res); Assert.IsTrue(oList.Count > 0, "No interviewers returned from list fetch"); }
public void GetActionDescripiton_InterviewHandlers() { List <InterviewHandler> oInterviewHandlers; var res = InterviewHandler.GetInterviewHandlers(_connectionServer, out oInterviewHandlers, 1, 1); Assert.IsTrue(res.Success, "Failed to fetch interview handlers:" + res); Assert.IsTrue(oInterviewHandlers.Count > 0, "Failed to find any interview handlers"); string strRet = _connectionServer.GetActionDescription(ActionTypes.GoTo, ConversationNames.PHInterview, oInterviewHandlers[0].ObjectId); Assert.IsTrue(strRet.ToLower().Contains("send to interview handler:"), "Interview handler route description not correct:" + strRet); strRet = _connectionServer.GetActionDescription(ActionTypes.GoTo, ConversationNames.PHInterview, "bogus"); Assert.IsTrue(strRet.ToLower().Contains("invalid link"), "Interview handler route description not correct for missing link:" + strRet); }
public void GetInterviewHandlers_Test() { List <InterviewHandler> oHandlerList; string strObjectId = ""; InterviewHandler oInterviewHandler; WebCallResult res = InterviewHandler.GetInterviewHandlers(_connectionServer, out oHandlerList, 1, 1, null); Assert.IsTrue(res.Success, "Fetching of first interview handler failed: " + res.ToString()); Assert.AreEqual(oHandlerList.Count, 1, "Fetching of the first interview handler returned a different number of handlers: " + res.ToString()); //exercise the ToString and DumpAllProperties as part of this test as well foreach (InterviewHandler oHandler in oHandlerList) { Console.WriteLine(oHandler.ToString()); Console.WriteLine(oHandler.DumpAllProps()); strObjectId = oHandler.ObjectId; //save for test below } //fetch interviewer by ObjectId res = InterviewHandler.GetInterviewHandler(out oInterviewHandler, _connectionServer, strObjectId); Assert.IsTrue(res.Success, "Fetching of interview handler by objectId failed: " + res.ToString()); res = oInterviewHandler.RefetchInterviewHandlerData(); Assert.IsTrue(res.Success, "Failed refetching interviewer data:" + res); Console.WriteLine(oInterviewHandler.DumpAllProps()); res = oInterviewHandler.Update(); Assert.IsFalse(res.Success, "Updating interview handler with no pending changes did not fail"); //failed fetch using bogus name res = InterviewHandler.GetInterviewHandler(out oInterviewHandler, _connectionServer, "", "blah"); Assert.IsFalse(res.Success, "Fetching of interview handler by bogus name did not fail"); res = InterviewHandler.GetInterviewHandlers(_connectionServer, out oHandlerList, 1, 2, "query=(ObjectId is Bogus)"); Assert.IsTrue(res.Success, "fetching handlers with invalid query should not fail:" + res); Assert.IsTrue(oHandlerList.Count == 0, "Invalid query string should return an empty handler list:" + oHandlerList.Count); }
public void Constructor_InvalidName_Failure() { InterviewHandler oTestInterviewer = new InterviewHandler(_connectionServer, "", "blah"); Console.WriteLine(oTestInterviewer); }
public void GetInterviewHandlerVoiceName_NullConnectionServer_Failure() { WebCallResult res = InterviewHandler.GetInterviewHandlerVoiceName(null, "c:\\test.wav", "objectId"); Assert.IsFalse(res.Success, "Fetching interview handler voice name did not fail with null connection server"); }
public void SetInterviewHandlerVoiceNameToStreamFile_InvalidStreamId_Failure() { var res = InterviewHandler.SetInterviewHandlerVoiceNameToStreamFile(_connectionServer, _tempHandler.ObjectId, "streamid"); Assert.IsFalse(res.Success, "Setting interview handler voice name to stream file did not fail with invalid stream id"); }
public void SetInterviewHandlerVoiceName_InvalieWavFileFormat_Failure() { var res = InterviewHandler.SetInterviewHandlerVoiceName(_connectionServer, "wavcopy.exe", _tempHandler.ObjectId, true); Assert.IsFalse(res.Success, "Setting interview handler voice name did not fail with non wav file reference"); }
public void Constructor_NullConnectionServer_Failure() { InterviewHandler oTestInterviewer = new InterviewHandler(null); Console.WriteLine(oTestInterviewer); }
public void SetInterviewHandlerVoiceName_InvalidObjectId_Failure() { var res = InterviewHandler.SetInterviewHandlerVoiceName(_connectionServer, "c:\\test.wav", "objectid", true); Assert.IsFalse(res.Success, "Setting interview handler voice name did not fail with invalid objectid"); }
public void GetInterviewHandlerVoiceName_EmptyWavFilePath_Failure() { var res = InterviewHandler.GetInterviewHandlerVoiceName(_mockServer, "", "bogus"); Assert.IsFalse(res.Success, "Fetching interview handler voice name did not fail with empty path"); }
public void DeleteInterviewHandler_InvalidObjectId_Failure() { var res = InterviewHandler.DeleteInterviewHandler(_connectionServer, "ObjectId"); Assert.IsFalse(res.Success, "Calling static method DeleteInterviewHandler did not fail with: invalid objectid"); }
public void SetInterviewHandlerVoiceName_NullConnectionServer_Failure() { var res = InterviewHandler.SetInterviewHandlerVoiceName(null, "c:\\test.wav", "objectid", true); Assert.IsFalse(res.Success, "Setting interview handler voice name did not fail with null connection server"); }
public void SetInterviewHandlerVoiceName_EmptyObjectId_Failure() { var res = InterviewHandler.SetInterviewHandlerVoiceName(_mockServer, "c:\\test.wav", "", true); Assert.IsFalse(res.Success, "Setting interview handler voice name did not fail with empty objectid"); }
public void SetInterviewHandlerVoiceName_EmptyWavFilePath_Failure() { var res = InterviewHandler.SetInterviewHandlerVoiceName(_mockServer, "", "objectid", true); Assert.IsFalse(res.Success, "Setting interview handler voice name did not fail with empty wav file path"); }
public void SetInterviewHandlerVoiceName_InvalidWavPath_Failure() { var res = InterviewHandler.SetInterviewHandlerVoiceName(_connectionServer, "c:\\bogus.wav", _tempHandler.ObjectId, true); Assert.IsFalse(res.Success, "Setting interview handler voice name did not fail with invalid wav file path"); }
public void SetInterviewHandlerVoiceNameToStreamFile_EmptyStreamId_Failure() { var res = InterviewHandler.SetInterviewHandlerVoiceNameToStreamFile(_mockServer, "objectid", ""); Assert.IsFalse(res.Success, "Setting interview handler voice name to stream file did not fail with empty stream id"); }