public void TestAddBookingandGetBooking() { Calendar lCalendar = new Calendar(); lCalendar.AddBooking(lTutorName, lStudentName, lPrice, lWeekDay); Assert.AreEqual((lCalendar.GetBookings(lTutorName, lWeekDay, true)).TutorName, lTutorName); }
public void TestCheck() { Calendar lCalendar = new Calendar(); lCalendar.AddBooking(lTutorName, lStudentName, lPrice, lWeekDay); Assert.IsFalse(lCalendar.Check(lTutorName, lWeekDay)); }
public void TestLoadandSave() { Calendar lCalendar = new Calendar(); lCalendar.AddBooking(lTutorName, lStudentName, lPrice, lWeekDay); lCalendar.SaveDays(Globals.TEST_FILE_NAME); Calendar lNewCalendar = new Calendar(); lNewCalendar.LoadDays(Globals.TEST_FILE_NAME); Booking lBookingOld = lCalendar.GetBookings(lTutorName, lWeekDay, true); Booking lBookingNew = lNewCalendar.GetBookings(lTutorName, lWeekDay, true); Assert.AreEqual(lBookingOld.StudentName, lBookingNew.StudentName); }