public void Calculate_WithLongStayFromSundayToTuesday_ReturnsCorrectCharge() { // arrange var start = new DateTime(2020, 4, 5); var end = new DateTime(2020, 4, 7); var stay = new LongStay(start, end); // act var charge = chargeCalculator.Calculate(stay); // assert // charge should be for 3 full days: £7.5 Assert.IsTrue(charge == 22.5M); }
public void Calculate_WithLongStayFromMidnightToEndOfCurrentDay_ReturnsCorrectCharge() { // arrange var start = new DateTime(2020, 3, 30); var end = new DateTime(2020, 3, 30, 23, 59, 59); var stay = new LongStay(start, end); // act var charge = chargeCalculator.Calculate(stay); // assert // charge should be for one full day: £7.5 Assert.IsTrue(charge == 7.5M); }