public void PromoRentalLessThan3ReturnsTotalWithoutDiscount() { decimal total = (5 + 60); ActualRental actual = new ActualRental(); actual.AddRental(new HourlyRental()); actual.AddRental(new WeeklyRental()); Assert.AreEqual(actual.GetPromo(), total); }
public void PromoRentalReturnsDiscount30PercentOfTotal() { decimal total = (5 + 20 + 60) * (decimal)0.7; ActualRental actual = new ActualRental(); actual.AddRental(new DailyRental()); actual.AddRental(new HourlyRental()); actual.AddRental(new WeeklyRental()); Assert.AreEqual(actual.GetPromo(), total); }
public void PromoRentalMoreThan5ReturnsTotalWithoutDiscount() { decimal total = 60 * 6; ActualRental batch = new ActualRental(); batch.AddRental(new WeeklyRental()); batch.AddRental(new WeeklyRental()); batch.AddRental(new WeeklyRental()); batch.AddRental(new WeeklyRental()); batch.AddRental(new WeeklyRental()); batch.AddRental(new WeeklyRental()); Assert.AreEqual(batch.GetPromo(), total); }