public void IsValidPassword_ReturnsTrue_WhenValidPassword(string password)
        {
            bool actual   = _validator.IsValidPassword(password);
            bool expected = true;

            Assert.Equal(expected, actual);
        }
Esempio 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);
 }