Esempio n. 1
0
        public void Get_Appointments_Unsuccessfuly()
        {
            RegularAppointmentService service           = new RegularAppointmentService(CreateStubRepository(2), new OperationService(new Mock <IOperationRepository>().Object));
            List <DoctorAppointment>  foundAppointments = service.GetAppointmentsForPatient(2);

            foundAppointments.ShouldBeEmpty();
        }
Esempio n. 2
0
        public void Get_Appointments_Unsuccessfuly()
        {
            RegularAppointmentService service           = new RegularAppointmentService(CreateStubRepositoryForFuture(), new Mock <IEmployeesScheduleRepository>().Object, new DoctorService(new Mock <IOperationRepository>().Object, CreateStubRepository(), new Mock <IEmployeesScheduleRepository>().Object, new Mock <IDoctorRepository>().Object), new Mock <IPatientsRepository>().Object, new OperationService(new Mock <IOperationRepository>().Object));
            List <DoctorAppointment>  foundAppointments = service.GetAppointmentsForPatient(1);

            foundAppointments.ShouldBeEmpty();
        }
 public IActionResult Get(int id)
 {
     return(Ok(new AppointmentAdapter().ConvertAppointmentListToAppointmentDtoList(regularAppointmentService.GetAppointmentsForPatient(id))));
 }