Esempio n. 1
0
        public void FamilyRentTest()
        {
            double totalByHour = _hourlyRental.GetPrice() * _hourlyRental.GetTime() * _hourlyRental.GetNumberOfBikes();
            double totalByDay  = _dailyRental.GetPrice() * _dailyRental.GetTime() * _dailyRental.GetNumberOfBikes();
            double totalByWeek = _weeklyRental.GetPrice() * _weeklyRental.GetTime() * _weeklyRental.GetNumberOfBikes();
            double total       = (totalByHour + totalByDay + totalByWeek) * 0.7;

            Assert.AreEqual(total, _familyRental.Rent(), 0);
        }
Esempio n. 2
0
 public void TimeTest()
 {
     _weeklyRental = new WeeklyRental(2, 7);
     Assert.AreEqual(7, _weeklyRental.GetTime());
 }