예제 #1
0
        public void Patient_DeleteAppointment_DeletesAllOfPatientAppointments()
        {
            Doctor doctor = new Doctor("Tom", "tom567", "567", "Cardiology");

            doctor.Save();
            Patient patient = new Patient("John", "john123", "123", new DateTime(1996, 04, 25));

            patient.Save();

            Appointment controlAppointment1 = new Appointment(new DateTime(2017, 06, 25), doctor.Id, patient.Id, "Yearly physical");
            Appointment controlAppointment2 = new Appointment(new DateTime(2017, 05, 21), doctor.Id, patient.Id, "Yearly physical");

            patient.DeleteAppointments();
            List <Appointment> testList    = patient.GetAppointments();
            List <Appointment> controlList = new List <Appointment> {
            };

            Assert.Equal(testList, controlList);
        }