public void EditClaimFieldSelectionTest1() { //Mock input List <ContractServiceLineClaimFieldSelection> contractServiceLineTableSelection = new List <ContractServiceLineClaimFieldSelection> { new ContractServiceLineClaimFieldSelection { ContractId = 1247 }, new ContractServiceLineClaimFieldSelection { ContractId = 1247 }, }; //Mock setup var mockEditServiceLineTableSelection = new Mock <IServiceLineClaimFieldRepository>(); mockEditServiceLineTableSelection.Setup(f => f.EditClaimFieldSelection(contractServiceLineTableSelection)). Returns(1); ServiceLineClaimFieldLogic target = new ServiceLineClaimFieldLogic(mockEditServiceLineTableSelection.Object); long actual = target.EditClaimFieldSelection(contractServiceLineTableSelection); Assert.AreEqual(1, actual); }
public void EditClaimFieldSelectionIfNullLogicUnitTest() { ServiceLineClaimFieldLogic target = new ServiceLineClaimFieldLogic(Constants.ConnectionString); const long expected = 0; long actual = target.EditClaimFieldSelection(null); Assert.AreEqual(expected, actual); }
/// <summary> /// Edit the new claim field selection. /// </summary> /// <param name="claimFieldSelection">The claim field selection.</param> public long EditClaimFieldSelection(List <ContractServiceLineClaimFieldSelection> claimFieldSelection) { return(_serviceLineClaimFieldLogic.EditClaimFieldSelection(claimFieldSelection)); }