Exemplo n.º 1
0
        public void PromoRentalLessThan3ReturnsTotalWithoutDiscount()
        {
            decimal total = (5 + 60);

            ActualRental actual = new ActualRental();

            actual.AddRental(new HourlyRental());
            actual.AddRental(new WeeklyRental());


            Assert.AreEqual(actual.GetPromo(), total);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }