Exemplo n.º 1
0
        public ActionResult <CancelMedicalAppointmentResponse> PutCancel(CancelMedicalAppointmentRequest request)
        {
            var service  = new CancelMedicalAppointmentService(_unitOfWork);
            var response = service.Ejecute(request);

            return(Ok(response));
        }
Exemplo n.º 2
0
        public void CancelMedicalAppointmentTest()
        {
            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 CancelMedicalAppointmentRequest {
                Identification = 1
            };
            var service  = new CancelMedicalAppointmentService(new UnitOfWork(_context));
            var response = service.Ejecute(request);

            Assert.AreEqual("Cita medica cancelada satisfactoriamente", response.Mensaje);
        }