public void FirstIntallmentAdjustmentPolicy_OlbIsAdjusted() { var installments = new List<IInstallment> { new Installment { Principal = 999, Olb = 3000 }, new Installment { Principal = 999, Olb = 2000 }, new Installment { Principal = 999, Olb = 1000 }, }; var policy = new FirstInstallmentAdjustmentPolicy(); policy.Adjust(installments, _configuration); Assert.That(installments[0].Olb, Is.EqualTo(3000)); Assert.That(installments[1].Olb, Is.EqualTo(1998)); Assert.That(installments[2].Olb, Is.EqualTo(999)); }
public void FirstInstallmentAdjustmentPolicy_WhenTotalIsLess_FirstInstallmentIsIncreased() { var installments = new List<IInstallment> { new Installment { Principal = 999 }, new Installment { Principal = 999 }, new Installment { Principal = 999 }, }; var policy = new FirstInstallmentAdjustmentPolicy(); policy.Adjust(installments, _configuration); Assert.That(installments[0].Principal, Is.EqualTo(1002)); Assert.That(installments[1].Principal, Is.EqualTo(999)); Assert.That(installments[2].Principal, Is.EqualTo(999)); }
public void FirstInstallmentAdjustmentPolicy_GracePeriodOfOne_AdjustedToSecondInstallment() { _configuration.GracePeriod = 1; var installments = new List<IInstallment> { new Installment { Principal = 0 }, new Installment { Principal = 999 }, new Installment { Principal = 999 }, new Installment { Principal = 999 }, }; var policy = new FirstInstallmentAdjustmentPolicy(); policy.Adjust(installments, _configuration); Assert.That(installments[0].Principal, Is.EqualTo(0)); Assert.That(installments[1].Principal, Is.EqualTo(1002)); }