Example #1
0
 public void GivenEmailAddress_WhenUsernameStartWithSpecialChar_ShouldThrowCustomException(String email, UserRegistrationException.ExceptionType expected)
 {
     try
     {
         bool result = userRegistration.ValidateEmailAddress(email);
     }
     catch (UserRegistrationException exception)
     {
         Assert.AreEqual(expected, exception.exceptionType);
     }
 }
Example #2
0
 public void GivenEmailAddress_WhenTldContainsDigit_ShouldThrowCustomException(String email, UserRegistrationException.ExceptionType expected)
 {
     try
     {
         bool result = userRegistration.ValidateEmailAddress(email);
     }
     catch (UserRegistrationException exception)
     {
         Assert.AreEqual(expected, exception.exceptionType);
     }
 }
Example #3
0
 public void GivenEmailAddress_WhenLessThanMinimumLength_ShouldThrowCustomException(String email, UserRegistrationException.ExceptionType expected)
 {
     try
     {
         bool result = userRegistration.ValidateEmailAddress("[email protected]");
     }
     catch (UserRegistrationException exception)
     {
         Assert.AreEqual(expected, exception.exceptionType);
     }
 }