public void AddPhoneSystem_NullConnectionServer_Failure() { PhoneSystem oPhoneSystem; WebCallResult res = PhoneSystem.AddPhoneSystem(null, "bogus", out oPhoneSystem); Assert.IsFalse(res.Success, "Static call to AddPhoneSystem with null ConnectionServerRest did not fail"); }
public void AddPhoneSystem_EmptyName_Failure() { PhoneSystem oPhoneSystem; var res = PhoneSystem.AddPhoneSystem(_mockServer, "", out oPhoneSystem); Assert.IsFalse(res.Success, "Static call to AddPhoneSystem with empty name did not fail"); }
public new static void MyClassInitialize(TestContext testContext) { BaseIntegrationTests.MyClassInitialize(testContext); WebCallResult res = PhoneSystem.AddPhoneSystem(_connectionServer, "UnitTest_" + Guid.NewGuid(), out _phoneSystem); Assert.IsTrue(res.Success, "Creating new temporary phone system failed:" + res); res = PortGroup.AddPortGroup(_connectionServer, "UnitTest_" + Guid.NewGuid(), _phoneSystem.ObjectId, _connectionServer.ServerName, TelephonyIntegrationMethodEnum.SIP, "", out _portGroup); Assert.IsTrue(res.Success, "Creating new temporary port group failed:" + res); }
public void AddPhoneSystem_ErrorResponse_Failure() { _mockTransport.Setup(x => x.GetCupiResponse(It.IsAny <string>(), MethodType.GET, It.IsAny <ConnectionServerRest>(), It.IsAny <string>(), true)).Returns(new WebCallResult { Success = false, ResponseText = "error text", StatusCode = 404 }); PhoneSystem oPhoneSystem; var res = PhoneSystem.AddPhoneSystem(_mockServer, "MediaSwitchObjectId", out oPhoneSystem); Assert.IsFalse(res.Success, "Calling AddPhoneSystem with ErrorResponse did not fail"); }