Example #1
0
        public void Must_Create_Installment_For_One_Installment_Credit_Operation()
        {
            var order = new Order();

            order.Total = 100;

            var payment = PaymentFactory.PayWithCredit();

            payment.CreateInstallments(order);

            Assert.IsNotNull(order.Installments);
            Assert.IsTrue(order.Installments.Count == 1);
            Assert.IsTrue(order.Installments[0].PaymentValue == order.Total);
            Assert.IsTrue(order.Installments[0].DueDate == DateTime.Today.AddMonths(1));
        }