Ejemplo n.º 1
0
        public async Task Post_validar_registro_usuario_no_existe_NotFound()
        {
            // Arrange
            var data           = new RegisterValidateCommand("123123123", "token-no-valido");
            var requestContent = SerializerUtils.GetRequestContent(data);

            // Act
            var response = await Client.PostAsync(BaseUrl, requestContent);

            // Assert
            response.StatusCode.ShouldBe(HttpStatusCode.BadRequest);
        }
Ejemplo n.º 2
0
        public async Task Post_validar_registro_usuario_OK()
        {
            // Arrange
            var responseContent = await RegisterUser();

            var parts          = responseContent.Callback.Split("code=");
            var code           = parts.Last();
            var data           = new RegisterValidateCommand(responseContent.Id, code);
            var requestContent = SerializerUtils.GetRequestContent(data);

            // Act
            var response = await Client.PostAsync(BaseUrl, requestContent);

            // Assert
            response.EnsureSuccessStatusCode();
        }
Ejemplo n.º 3
0
 public async Task <IActionResult> RegisterValidateCode(RegisterValidateCommand registerValidateCommand)
 {
     return(Ok(await Mediator.Send(registerValidateCommand)));
 }