public void IsValidEmail_ReturnsTrue_WhenValidEmail()
        {
            string email    = "*****@*****.**";
            bool   actual   = _validator.IsValidEmail(email);
            bool   expected = true;

            Assert.Equal(expected, actual);
        }
Exemplo n.º 2
0
 private bool IsValidAuthRequest(RegisterRequest request)
 {
     if (request.Password != request.RepeatedPassword)
     {
         return(false);
     }
     if (!_validator.IsValidEmail(request.Email) || !_validator.IsValidPassword(request.Password))
     {
         return(false);
     }
     if (_authRepo.IsEmailTaken(request.Email))
     {
         return(false);
     }
     return(true);
 }