public void EvaluateIfClaimHasNoPayerTest()
        {
            // Arrange
            _target = new EvaluateableClaimLogic();
            IEvaluateableClaim claim = new EvaluateableClaim();

            claim.ClaimId = 123;
            List <PaymentResult> paymentResults = new List <PaymentResult>();
            PaymentResult        paymentResult  = new PaymentResult {
                ClaimId = 123
            };

            paymentResults.Add(paymentResult);
            PaymentResult paymentResultForLine = new PaymentResult {
                ClaimId = 123, Line = 1
            };

            paymentResults.Add(paymentResultForLine);

            //Act
            List <PaymentResult> actual = _target.Evaluate(claim, paymentResults, false, false);

            // Assert
            PaymentResult overAllClaimPaymentResult = actual.FirstOrDefault(
                payment => payment.Line == null && payment.ServiceTypeId == null);

            if (overAllClaimPaymentResult != null)
            {
                Assert.AreEqual(overAllClaimPaymentResult.ClaimStatus, (byte)Enums.AdjudicationOrVarianceStatuses.ClaimDataError);
            }
        }
        public void EvaluateIfClaimHasNoLineTest()
        {
            // Arrange
            _target = new EvaluateableClaimLogic();
            IEvaluateableClaim claim = new EvaluateableClaim();

            claim.ClaimId       = 123;
            claim.PriPayerName  = "Blue Cross";
            claim.BillType      = "141";
            claim.ClaimState    = "Billed";
            claim.ClaimType     = "hosp";
            claim.StatementFrom = DateTime.Now;
            claim.StatementThru = DateTime.Now;
            claim.ClaimTotal    = 200;
            List <PaymentResult> paymentResults = new List <PaymentResult>();
            PaymentResult        paymentResult  = new PaymentResult {
                ClaimId = 123
            };

            paymentResults.Add(paymentResult);
            PaymentResult paymentResultForLine = new PaymentResult {
                ClaimId = 123, Line = 1
            };

            paymentResults.Add(paymentResultForLine);

            // Act
            List <PaymentResult> actual = _target.Evaluate(claim, paymentResults, false, false);

            // Assert
            PaymentResult overAllClaimPaymentResult = actual.FirstOrDefault(
                payment => payment.Line == null && payment.ServiceTypeId == null);

            if (overAllClaimPaymentResult != null)
            {
                Assert.AreEqual(overAllClaimPaymentResult.ClaimStatus, (byte)Enums.AdjudicationOrVarianceStatuses.AdjudicationErrorMissingServiceLine);
            }
        }