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); string strName = "Temp_" + Guid.NewGuid().ToString(); WebCallResult res = SearchSpace.AddSearchSpace(_connectionServer, out _searchSpace, strName, "SearchSpace added by Unit Test"); Assert.IsTrue(res.Success, "Creation of new SearchSpace failed"); strName = "Temp_" + Guid.NewGuid().ToString(); res = Partition.AddPartition(_connectionServer, out _partition, strName, "Partition added by Unit Test"); Assert.IsTrue(res.Success, "Creation of new partition failed"); }
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 new static void MyClassInitialize(TestContext testContext) { BaseIntegrationTests.MyClassInitialize(testContext); //create new list with GUID in the name to ensure uniqueness String strUserAlias = "TempUserMbx_" + 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 WebCallResult res = UserBase.AddUser(_connectionServer, "voicemailusertemplate", strUserAlias, strExtension, null, out _tempUser); Assert.IsTrue(res.Success, "Failed creating temporary user:" + res.ToString()); }
public new static void MyClassInitialize(TestContext testContext) { BaseIntegrationTests.MyClassInitialize(testContext); //grab the first template - should always be one and it doesn't matter which List <CallHandlerTemplate> oTemplates; WebCallResult res = CallHandlerTemplate.GetCallHandlerTemplates(_connectionServer, out oTemplates); if (res.Success == false || oTemplates == null || oTemplates.Count == 0) { Assert.Fail("Could not fetch call handler templates:" + res); } //create new handler with GUID in the name to ensure uniqueness String strName = "TempHandler_" + Guid.NewGuid().ToString().Replace("-", ""); res = CallHandler.AddCallHandler(_connectionServer, oTemplates[0].ObjectId, strName, "", null, out _tempHandler); Assert.IsTrue(res.Success, "Failed creating temporary callhandler:" + res.ToString()); }
public new static void MyClassInitialize(TestContext testContext) { BaseIntegrationTests.MyClassInitialize(testContext); Settings mySettings = new Settings(); _extensionToDial = mySettings.ExtensionToDial; if (string.IsNullOrEmpty(_extensionToDial)) { Assert.Fail("No extension defined to run phone recording tests"); return; } try { _recording = new PhoneRecording(_connectionServer, _extensionToDial, 6); } catch (UnityConnectionRestException ex) { Assert.Fail("Phone connection failed to extension:{0}, error={1}", _extensionToDial, ex.WebCallResult); } Assert.IsTrue(_recording.IsCallConnected(), "Call not connected after class creation"); }
public new static void MyClassInitialize(TestContext testContext) { BaseIntegrationTests.MyClassInitialize(testContext); }