public void GetPaymentResultsIfClaimNull()
        {
            _mockPaymentResultLogic = new Mock <IPaymentResultRepository>();
            var paymentResults = new List <PaymentResult>
            {
                new PaymentResult {
                    ClaimId = 123, AdjudicatedValue = 100, ContractId = 101
                },
                new PaymentResult {
                    ClaimId = 123, ContractId = 101
                }
            };
            var mockPaymentResultLogic = new Mock <IPaymentResultLogic>();

            mockPaymentResultLogic.Setup(
                x =>
                x.Evaluate(It.IsAny <EvaluateableClaim>(), It.IsAny <List <PaymentResult> >(), It.IsAny <bool>(),
                           It.IsAny <bool>())).Returns(paymentResults);
            _target = new PaymentResultLogic(_mockPaymentResultLogic.Object);

            //Act
            List <PaymentResult> actual = _target.GetPaymentResults(null);

            // Assert
            Assert.AreEqual(0, actual.Count);
        }
        public void GetPaymentResultsIfClaimNotNull()
        {
            _mockPaymentResultLogic = new Mock <IPaymentResultRepository>();
            var paymentResults = new List <PaymentResult>
            {
                new PaymentResult {
                    ClaimId = 123, AdjudicatedValue = 100, ContractId = 101
                },
                new PaymentResult {
                    ClaimId = 123, ContractId = 101
                }
            };
            var mockPaymentResultLogic = new Mock <IPaymentResultLogic>();

            mockPaymentResultLogic.Setup(
                x =>
                x.Evaluate(It.IsAny <EvaluateableClaim>(), It.IsAny <List <PaymentResult> >(), It.IsAny <bool>(),
                           It.IsAny <bool>())).Returns(paymentResults);
            _target = new PaymentResultLogic(_mockPaymentResultLogic.Object);
            var evaluateableClaim = new EvaluateableClaim
            {
                ClaimId      = 123,
                ClaimCharges = new List <ClaimCharge>
                {
                    new ClaimCharge
                    {
                        Line    = 1,
                        Amount  = 20,
                        RevCode = "250"
                    }
                }
            };

            //Act
            List <PaymentResult> actual = _target.GetPaymentResults(evaluateableClaim);

            // Assert
            Assert.AreEqual(evaluateableClaim.ClaimCharges[0].Amount, actual[1].ClaimTotalCharges);
        }