public void Appointment_GetAll_DatabaseEmptyOnload() { List <Appointment> testList = Appointment.GetAll(); List <Appointment> controlList = new List <Appointment> { }; Assert.Equal(controlList, testList); }
public void Appointment_Save_SaveToDatabase() { Doctor newDoctor = new Doctor("Tom", "tom567", "567", "Cardiology"); newDoctor.Save(); Patient newPatient = new Patient("John", "john123", "123", new DateTime(1996, 04, 25)); newPatient.Save(); Appointment newAppointment = new Appointment(new DateTime(2017, 05, 21), newDoctor.Id, newPatient.Id, "Yearly physical"); newAppointment.Save(); Appointment testAppointment = Appointment.GetAll()[0]; Assert.Equal(newAppointment, testAppointment); }