public void IsContractNameExistTest() { var mockContractRepository = new Mock <IContractRepository>(); var mockContractServiceTypeLogic = new Mock <IContractServiceTypeLogic>(); var mockPaymentResultLogic = new Mock <IPaymentResultLogic>(); var contract = new Contract { ContractId = 123, ContractName = "ABC", IsProfessional = true, PayersList = "blue Cross", Conditions = new List <ICondition>(), Payers = new List <Payer> { new Payer { PayerName = "Aetna" } }, CustomField = 29, PayerCode = "Test1" }; mockContractRepository.Setup(f => f.IsContractNameExist(It.IsAny <Contract>())).Returns(true); var target = new ContractLogic(mockContractRepository.Object, mockContractServiceTypeLogic.Object, mockPaymentResultLogic.Object); bool actual = target.IsContractNameExist(contract); Assert.AreEqual(true, actual); }
public bool IsContractNameExist(Shared.Models.Contract contract) { return(_contractLogic.IsContractNameExist(contract)); }