public void InsertContractLogsIfServiceTypeIdIsNullTest() { ContractLogLogic target = new ContractLogLogic(Constants.ConnectionString); var paymentResults = new List <PaymentResult> { new PaymentResult { ClaimId = 123, Line = null, ServiceTypeId = 10, AdjudicatedValue = 1458.78, PaymentTypeId = 1252 }, new PaymentResult { ClaimId = 123, Line = null, ServiceTypeId = null, ContractId = 7845 } }; var paymentResultDictionary = new Dictionary <long, List <PaymentResult> > { { 1, paymentResults } }; List <Contract> contracts = new List <Contract> { new Contract { ContractId = 123, ContractName = "Contract1" }, new Contract { ContractId = 7845, ContractName = "Contract2", ContractServiceTypes = new Collection <ContractServiceType> { new ContractServiceType { ContractServiceTypeId = 10 } } } }; bool actual = target.AddContractLog(paymentResultDictionary, contracts); Assert.AreEqual(true, actual); }
public void InsertContractLogsIfPaymentResultsIsNotNullTest() { ContractLogLogic target = new ContractLogLogic(Constants.ConnectionString); var paymentResults = new List <PaymentResult> { new PaymentResult { ClaimId = 123, Line = 1, ServiceTypeId = 10 }, new PaymentResult { ClaimId = 123, Line = 1, ServiceTypeId = 5 } }; var paymentResultDictionary = new Dictionary <long, List <PaymentResult> > { { 1, paymentResults } }; List <Contract> contracts = new List <Contract> { new Contract { ContractId = 123, ContractName = "Contract1" }, new Contract { ContractId = 456, ContractName = "Contract2" } }; bool actual = target.AddContractLog(paymentResultDictionary, contracts); Assert.AreEqual(true, actual); }
public void ContractLogsLogicParameterizedConstructor() { _mockContractLogRepository = new Mock <IContractLogRepository>(); _target = new ContractLogLogic(_mockContractLogRepository.Object); //Assert Assert.IsInstanceOfType(_target, typeof(ContractLogLogic)); }
public void InsertContractLogsIfPaymentResultsIsNullTest() { ContractLogLogic target = new ContractLogLogic(Constants.ConnectionString); bool actual = target.AddContractLog(null, null); Assert.AreEqual(false, actual); }
public void ContractLogsLogicConstructorTest() { ContractLogLogic target = new ContractLogLogic(Constants.ConnectionString); Assert.IsInstanceOfType(target, typeof(ContractLogLogic)); }