public void Get_Appointments_In_Next_Two_Days_Successfuly() { RegularAppointmentService service = new RegularAppointmentService(CreateStubRepositoryForNextTwoDays(), new OperationService(new Mock <IOperationRepository>().Object)); List <DoctorAppointment> foundAppointments = service.GetAppointmentsForPatientInTwoDays(1); foundAppointments.ShouldNotBeEmpty(); }
public void Get_Appointments_In_Next_Two_Days_Unsuccessfuly_Because_They_Happend_After() { RegularAppointmentService service = new RegularAppointmentService(CreateStubRepositoryForFuture(1), new OperationService(new Mock <IOperationRepository>().Object)); List <DoctorAppointment> foundAppointments = service.GetAppointmentsForPatientInTwoDays(1); foundAppointments.ShouldBeEmpty(); }
public void Get_Appointments_In_Next_Two_Days_Unsuccessfuly_Because_They_Happend_Before() { RegularAppointmentService service = new RegularAppointmentService(CreateStubRepository(), 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.GetAppointmentsForPatientInTwoDays(1); foundAppointments.ShouldBeEmpty(); }
public IActionResult GetAppointmentsForPatientInTwoDays(int id) { return(Ok(ViewAppointmentAdapter.AppointmentListToViewAppointmenDtoList(regularAppointmentService.GetAppointmentsForPatientInTwoDays(id)))); }