Exemple #1
0
        public void TennisCourtRentTest(int startHours, int startMinutes, int endHours, int endMinutes, double expectedCost)
        {
            IRentable tennisCourt = new TennisCourtAggressiveAdvertisement(false);
            var       cost        = tennisCourt.CalculateTotalRentCost(new DateTime(2019, 09, 05, startHours, startMinutes, 00),
                                                                       new DateTime(2019, 09, 05, endHours, endMinutes, 00));

            Assert.Equal(Math.Round(expectedCost, 2), Math.Round(cost, 2));
        }
Exemple #2
0
        public void TennisCourtAgressiveAdvertisementTest(int startMonth, int startDay, int endMonth, int endDay, double expectedCost)
        {
            IAdvertisable tennisCourt = new TennisCourtAggressiveAdvertisement(false);
            var           cost        = tennisCourt.CalculateTotalAdvertisementCost(new DateTime(2019, startMonth, startDay, 0, 0, 00),
                                                                                    new DateTime(2019, endMonth, endDay, 0, 0, 00));

            Assert.Equal(Math.Round(expectedCost, 2), Math.Round(cost, 2));
        }