public void Nopenalty2daysafterbillingday() { var sut = new RentMonthlySurcharger(); var lse = NewLease(5, 2.May(2018), 0.03M); var charges = sut.GetPenalties(lse, 7.May(2018), 100); charges.Should().BeNull(); }
public void Nullifnegativebalance() { var sut = new RentMonthlySurcharger(); var lse = NewLease(5, 2.May(2018), 0.03M); var bal = (decimal?)-123; var charges = sut.GetPenalties(lse, 6.May(2018), bal); charges.Should().BeNull(); }
public void Appliesroundedpenaltyatbillingday() { var sut = new RentMonthlySurcharger(); var lse = NewLease(5, 2.May(2018), 0.03M); var bal = 90M; var charges = sut.GetPenalties(lse, 6.May(2018), bal); charges.Single().Amount.Should().Be(3); }
public void Nullifinactivelease() { var sut = new RentMonthlySurcharger(); var lse = new InactiveLeaseDTO { Rent = new RentParams { PenaltyRule = sut.RuleName } }; var charges = sut.GetPenalties(lse, 6.May(2018), 123); charges.Should().BeNull(); }
public void Appliespenaltyrightafterbillingday() { var sut = new RentMonthlySurcharger(); var lse = NewLease(5, 2.May(2018), 0.03M); var bal = 100M; var charges = sut.GetPenalties(lse, 6.May(2018), bal); charges.Should().HaveCount(1); var penalty = charges.Single(); penalty.Amount.Should().Be(100M * 0.03M); penalty.Label.Should().Be(sut.RuleName); }