public void Get_all_malicious_patients() { PatientService patientService = new PatientService(CreatePatientStubRepository()); AppointmentService appointmentService = new AppointmentService(CreateDoctorWorkDayStubRepository(), patientService); appointmentService.CancelPatientAppointment(8, new DateTime(2020, 12, 4)); appointmentService.CancelPatientAppointment(9, new DateTime(2020, 12, 4)); appointmentService.CancelPatientAppointment(10, new DateTime(2020, 12, 4)); List <Patient> result = patientService.GetMaliciousPatients(); Assert.Single(result); }
public void Cancel_patient_appointment_invalid_data() { AppointmentService appointmentService = new AppointmentService(CreateDoctorWorkDayStubRepository(), null); appointmentService.CancelPatientAppointment(2, new DateTime(2020, 12, 4)); Appointment canceledAppointment = appointmentService.GetEntity(2); Assert.False(canceledAppointment.Canceled); }