public void GetTransferOption_NullConnectionServer_Failure() { TransferOption oTransfer; var res = TransferOption.GetTransferOption(null, "", TransferOptionTypes.Alternate, out oTransfer); Assert.IsFalse(res.Success, "Null ConnectionServerRest parameter should fail"); }
public void GetTransferOption_EmptyObjectId_Failure() { TransferOption oTransfer; var res = TransferOption.GetTransferOption(_mockServer, "", TransferOptionTypes.Standard, out oTransfer); Assert.IsFalse(res.Success, "Empty ObjectId should should fail"); }
public void GetTransferOption_InvalidTransferType_Failure() { TransferOption oTransfer; var res = TransferOption.GetTransferOption(_mockServer, "objectid", TransferOptionTypes.Invalid, out oTransfer); Assert.IsFalse(res.Success, "Invalid transfer option type should fail"); }
public void Constructor_InvalidTranserOptionType_Failure() { Reset(); TransferOption oTest = new TransferOption(_mockServer, "objectid", TransferOptionTypes.Invalid); Console.WriteLine(oTest); }
public void UpdateTransferOptionEnabledStatus_EnableWithDateInThePast_Failure() { var res = TransferOption.UpdateTransferOptionEnabledStatus(_connectionServer, _callHandler.ObjectId, TransferOptionTypes.Alternate, true, DateTime.Now.AddDays(-1)); Assert.IsFalse(res.Success, "Enabling rule with date in the past should fail"); }
public void Constructor_NullConnectionServer_Failure() { Reset(); TransferOption oTest = new TransferOption(null, "objectid", TransferOptionTypes.Alternate); Console.WriteLine(oTest); }
public void Constructor_EmptyObjectId_Failure() { Reset(); TransferOption oTest = new TransferOption(_mockServer, "", TransferOptionTypes.Alternate); Console.WriteLine(oTest); }
public void Constructor_Base_Success() { Reset(); TransferOption oTest = new TransferOption(); Console.WriteLine(oTest); }
public void UpdateTransferOptionEnabledStatus_DisableRuleWithDateInTheFuture_Failure() { var res = TransferOption.UpdateTransferOptionEnabledStatus(_connectionServer, _callHandler.ObjectId, TransferOptionTypes.Alternate, false, DateTime.Now.AddDays(1)); Assert.IsFalse(res.Success, "Disabing a transfer option with a date in the future should fail"); }
public void PropertyGetFetch_TimeExpiresSetNull() { TransferOption oOptions = new TransferOption(); const string expectedValue = ""; oOptions.TimeExpiresSetNull(); Assert.IsTrue(oOptions.ChangeList.ValueExists("TimeExpires", expectedValue), "TimeExpires value get fetch failed"); }
public void Update_NoPendingChanges_Failure() { Reset(); TransferOption oOption = new TransferOption(_mockServer, "HandlerObjectId", TransferOptionTypes.Alternate); var res = oOption.Update(); Assert.IsFalse(res.Success, "Calling update with no pending changes should fail"); }
public void GetTransferOptions_NullConnectionServer_Failure() { List <TransferOption> oTransferOptions; WebCallResult res = TransferOption.GetTransferOptions(null, "objectid", out oTransferOptions); Assert.IsFalse(res.Success, "Null Connection server parameter should fail"); }
public void PropertyGetFetch_TransferType() { TransferOption oOptions = new TransferOption(); const TransferTypes expectedValue = TransferTypes.Unsupervised; oOptions.TransferType = expectedValue; Assert.IsTrue(oOptions.ChangeList.ValueExists("TransferType", (int)expectedValue), "TransferType value get fetch failed"); }
public void GetTransferOption_InvalidObjectId_Failure() { TransferOption oTransfer; var res = TransferOption.GetTransferOption(_connectionServer, "ObjectId", TransferOptionTypes.OffHours, out oTransfer); Assert.IsFalse(res.Success, "Invalid ObjectId should fail"); }
public void GetTransferOptions_InvalidObjectId_Failure() { List <TransferOption> oTransferOptions; var res = TransferOption.GetTransferOptions(_connectionServer, "ObjectId", out oTransferOptions); Assert.IsFalse(res.Success, "Invalid CallHandlerObjectID should fail"); }
public void PropertyGetFetch_RnaAction() { TransferOption oOptions = new TransferOption(); const TransferActionTypes expectedValue = TransferActionTypes.Transfer; oOptions.RnaAction = expectedValue; Assert.IsTrue(oOptions.ChangeList.ValueExists("RnaAction", (int)expectedValue), "RnaAction value get fetch failed"); }
public void PropertyGetFetch_PlayTransferPrompt() { TransferOption oOptions = new TransferOption(); const bool expectedValue = false; oOptions.PlayTransferPrompt = expectedValue; Assert.IsTrue(oOptions.ChangeList.ValueExists("PlayTransferPrompt", expectedValue), "PlayTransferPrompt value get fetch failed"); }
public void PropertyGetFetch_PersonalCallTransfer() { TransferOption oOptions = new TransferOption(); const bool expectedValue = true; oOptions.PersonalCallTransfer = expectedValue; Assert.IsTrue(oOptions.ChangeList.ValueExists("PersonalCallTransfer", expectedValue), "PersonalCallTransfer value get fetch failed"); }
public void PropertyGetFetch_MediaSwitchObjectId() { TransferOption oOptions = new TransferOption(); const string expectedValue = "String value"; oOptions.MediaSwitchObjectId = expectedValue; Assert.IsTrue(oOptions.ChangeList.ValueExists("MediaSwitchObjectId", expectedValue), "MediaSwitchObjectId value get fetch failed"); }
public void PropertyGetFetch_Extension() { TransferOption oOptions = new TransferOption(); const string expectedValue = "String value"; oOptions.Extension = expectedValue; Assert.IsTrue(oOptions.ChangeList.ValueExists("Extension", expectedValue), "Extension value get fetch failed"); }
public void Constructor_ObjectId_Success() { Reset(); TransferOption oTest = new TransferOption(_mockServer, "ObjectId", TransferOptionTypes.OffHours); Console.WriteLine(oTest.ToString()); Console.WriteLine(oTest.DumpAllProps()); }
public void PropertyGetFetch_TransferHoldingMode() { TransferOption oOptions = new TransferOption(); const ModeYesNoAsk expectedValue = ModeYesNoAsk.Ask; oOptions.TransferHoldingMode = expectedValue; Assert.IsTrue(oOptions.ChangeList.ValueExists("TransferHoldingMode", (int)expectedValue), "TransferHoldingMode value get fetch failed"); }
public void GetTransferOption_InvalidTransferOptionType_Failure() { TransferOption oTransfer; var res = TransferOption.GetTransferOption(_connectionServer, _callHandler.ObjectId, TransferOptionTypes.Invalid, out oTransfer); Assert.IsFalse(res.Success, "Invalid transfer option type should fail"); }
public void PropertyGetFetch_TransferRings() { TransferOption oOptions = new TransferOption(); const int expectedValue = 7; oOptions.TransferRings = expectedValue; Assert.IsTrue(oOptions.ChangeList.ValueExists("TransferRings", expectedValue), "TransferRings value get fetch failed"); }
public void PropertyGetFetch_TransferScreening() { TransferOption oOptions = new TransferOption(); const bool expectedValue = false; oOptions.TransferScreening = expectedValue; Assert.IsTrue(oOptions.ChangeList.ValueExists("TransferScreening", expectedValue), "TransferScreening value get fetch failed"); }
public void PropertyGetFetch_TUsePrimaryExtension() { TransferOption oOptions = new TransferOption(); const bool expectedValue = false; oOptions.UsePrimaryExtension = expectedValue; Assert.IsTrue(oOptions.ChangeList.ValueExists("UsePrimaryExtension", expectedValue), "UsePrimaryExtension value get fetch failed"); }
public void CanBeCreatedWithValidNameAndValue() { TransferOption option = new TransferOption("Test", "Hallo Welt"); Assert.AreEqual("Test", option.Name); Assert.AreEqual("Hallo Welt", option.Value); Assert.IsFalse(option.IsAcknowledged); }
public void UpdateTransferOption_InvalidObjectId_Failure() { var oProps = new ConnectionPropertyList(); oProps.Add("test", "test"); var res = TransferOption.UpdateTransferOption(_connectionServer, "objectid", TransferOptionTypes.Alternate, oProps); Assert.IsFalse(res.Success, "Calling update for transfer options with no parameters should fail"); }
public void TransferOptions_Test() { _errorString = ""; List <TransferOption> oTransferOptions; var res = TransferOption.GetTransferOptions(_connectionServer, _tempUser.PrimaryCallHandler().ObjectId, out oTransferOptions); Assert.IsTrue(res.Success & oTransferOptions.Count > 0, "Failed to fetch TransferOptions:" + res); Assert.IsTrue(string.IsNullOrEmpty(_errorString), _errorString); }
public void GetTransferOption_ManualConstruction_Success() { try { var oTransfer = new TransferOption(_connectionServer, _callHandler.ObjectId, TransferOptionTypes.Alternate); Assert.Fail("Invalid transfer option type should fail."); } catch (Exception ex) { Console.WriteLine("Expected failure on construction with invalid transfer option:" + ex); } }