public void Nullifnullbalance() { var sut = new RentZeroBackrent(); var lse = LeaseWithPenaltyRate(0.03M); var oldBal = (decimal?)null; var charges = sut.GetPenalties(lse, 3.May(2018), oldBal); charges.Should().BeNull(); }
public void ErrorifDifferentRule() { var sut = new RentZeroBackrent(); var lse = LeaseWithPenaltyRate(0.03M); lse.Rent.PenaltyRule = "a different rule"; sut.Invoking(_ => _.GetPenalties(lse, 3.May(2018), 123)) .Should().Throw <BadKeyException>(); }
public void RateTimesBalance() { var sut = new RentZeroBackrent(); var lse = LeaseWithPenaltyRate(0.03M); var date = 3.May(2018); var oldBal = 100; var charges = sut.GetPenalties(lse, date, oldBal); charges.Should().BeNull(); }
public void Nullifinactivelease() { var sut = new RentZeroBackrent(); var lse = new InactiveLeaseDTO { Rent = new RentParams { PenaltyRule = sut.RuleName } }; var charges = sut.GetPenalties(lse, 3.May(2018), 123); charges.Should().BeNull(); }