Ejemplo n.º 1
0
        public void ShouldReturnTheCorrectAmoutPastDue()
        {
            var paymentPlan      = new PaymentPlan(1000, 4);
            var firstInstallment = paymentPlan.FirstInstallment();

            paymentPlan.MakePayment(250, firstInstallment.Id);

            var pastDueDate   = DateTime.Now.AddMonths(3);
            var amountPastDue = paymentPlan.AmountPastDue(pastDueDate);

            Assert.Equal(750, amountPastDue);
        }
        public void AmountPastDueIsReturnedForPendingStatuses()
        {
            SetupPaymentService();
            var paymentPlan      = new PaymentPlan(_userId, 100, ThirPartyPaymentAPIMock, 4);
            var firstInstallment = paymentPlan.FirstInstallment();

            paymentPlan.MakePayment(25, firstInstallment.Id);

            var amountPastDue = paymentPlan.AmountPastDue(Today().AddMonths(3));

            Assert.Equal(75, amountPastDue);
        }
Ejemplo n.º 3
0
        public void WhenPaymentPastDueAmountPastDueReflectsPayment()
        {
            var paymentPlan = new PaymentPlan(100, 4);

            Assert.Equal(25, paymentPlan.AmountPastDue());
        }