Ejemplo n.º 1
0
        public void TestAddBookingandGetBooking()
        {
            Calendar lCalendar = new Calendar();

            lCalendar.AddBooking(lTutorName, lStudentName, lPrice, lWeekDay);

            Assert.AreEqual((lCalendar.GetBookings(lTutorName, lWeekDay, true)).TutorName, lTutorName);
        }
Ejemplo n.º 2
0
        public void TestCheck()
        {
            Calendar lCalendar = new Calendar();

            lCalendar.AddBooking(lTutorName, lStudentName, lPrice, lWeekDay);

            Assert.IsFalse(lCalendar.Check(lTutorName, lWeekDay));
        }
Ejemplo n.º 3
0
        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);
        }