public ActionResult <RegisterMedicalAppointmentResponse> Post(RegisterMedicalAppointmentRequest request) { var service = new RegisterMedicalAppointmentService(_unitOfWork); var response = service.Ejecute(request); return(Ok(response)); }
public void RegisterMedicalAppointmentOphthalmologistTest() { var request = new RegisterMedicalAppointmentRequest { Doctor = new Doctor { Id = "4444" }, Patient = new Patient { Id = "1004", Stratum = 4 }, Date = DateTime.Now.AddDays(5) }; var service = new RegisterMedicalAppointmentService(new UnitOfWork(_context)); var response = service.Ejecute(request); Assert.AreEqual("Cita medica creada satisfactoriamente", response.Mensaje); }
public void PostponeMedicalAppointmentTest() { var requestA = new RegisterMedicalAppointmentRequest { Doctor = new Doctor { Id = "4444" }, Patient = new Patient { Id = "1004", Stratum = 4 }, Date = DateTime.Now.AddDays(5) }; var serviceA = new RegisterMedicalAppointmentService(new UnitOfWork(_context)); serviceA.Ejecute(requestA); var request = new PostponeMedicalAppointmentRequest { Identification = 1, Date = DateTime.Now.AddDays(8) }; var service = new PostponeMedicalAppointmentService(new UnitOfWork(_context)); var response = service.Ejecute(request); Assert.AreEqual("Cita medica aplazada satisfactoriamente", response.Mensaje); }