Exemplo n.º 1
0
        public void GetAdjudicatedContractsTest()
        {
            var mockContractRepository       = new Mock <IContractRepository>();
            var mockContractServiceTypeLogic = new Mock <IContractServiceTypeLogic>();
            var mockPaymentResultLogic       = new Mock <IPaymentResultLogic>();
            var expected = new List <Contract>
            {
                new Contract
                {
                    ContractId     = 7845,
                    ContractName   = "ABC",
                    IsProfessional = true,
                    PayersList     = "blue Cross",
                    Conditions     = new List <ICondition>
                    {
                        new Condition
                        {
                            ConditionOperator  = (byte)Enums.ConditionOperation.EqualTo,
                            RightOperand       = "121",
                            OperandIdentifier  = (byte)Enums.OperandIdentifier.BillType,
                            OperandType        = (byte)Enums.OperandType.Numeric,
                            PropertyColumnName = Constants.PropertyBillType
                        }
                    },
                    Payers = new List <Payer> {
                        new Payer {
                            PayerName = "Aetna"
                        }
                    },
                    CustomField = 29,
                    PayerCode   = "Test1"
                }
            };
            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.GetAdjudicatedContracts(It.IsAny <Contract>())).Returns(expected);
            var             target = new ContractLogic(mockContractRepository.Object, mockContractServiceTypeLogic.Object, mockPaymentResultLogic.Object);
            List <Contract> actual = target.GetAdjudicatedContracts(contract);

            Assert.AreEqual(expected[0].ContractId, actual[0].ContractId);
        }
Exemplo n.º 2
0
 public List <Shared.Models.Contract> GetAdjudicatedContracts(Shared.Models.Contract contract)
 {
     return(_contractLogic.GetAdjudicatedContracts(contract));
 }