public ActionResult <RegisterDoctorResponse> Post(RegisterDoctorRequest request) { var service = new RegisterDoctorService(_unitOfWork); var response = service.Ejecute(request); return(Ok(response)); }
public RegisterDoctorResponse Post(RegisterDoctorRequest request) { var doctor = this.clinicsApplication.RegisterDoctor(Request.ToCaller(), request.ClinicId, request.FirstName, request.LastName); return(new RegisterDoctorResponse { Doctor = doctor }); }
public void CreateOphthalmologistTest() { var request = new RegisterDoctorRequest { Identification = "4444", Name = "Doctor", Surname = "Prueba", Age = 30, Degree = "Oftalmologo", Experience = 7, Gender = "Masculino" }; var service = new RegisterDoctorService(new UnitOfWork(_context)); var response = service.Ejecute(request); Assert.AreEqual("Doctor registrado satisfactoriamente", response.Mensaje); }
public void Initialize() { this.identifierFactory = new Mock <IIdentifierFactory>(); this.identifierFactory.Setup(f => f.IsValid(It.IsAny <Identifier>())).Returns(true); this.validator = new RegisterDoctorRequestValidator(this.identifierFactory.Object); this.dto = new RegisterDoctorRequest { ClinicId = "aclinicid", FirstName = "afirstname", LastName = "alastname" }; }
/// <summary> /// Registers the user as a doctor. /// </summary> /// <remarks> /// Called when a user wants to register as a doctor. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <UserProfileResponse> RegisterMedicalAsync(this IPlatformEndpoints operations, RegisterDoctorRequest body = default(RegisterDoctorRequest), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.RegisterMedicalWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Registers the user as a doctor. /// </summary> /// <remarks> /// Called when a user wants to register as a doctor. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> public static UserProfileResponse RegisterMedical(this IPlatformEndpoints operations, RegisterDoctorRequest body = default(RegisterDoctorRequest)) { return(operations.RegisterMedicalAsync(body).GetAwaiter().GetResult()); }