public void AssertValidEmailAddresses(
     [Values(
         "*****@*****.**", 
         "*****@*****.**", 
         "*****@*****.**", 
         "\"Abc\\@d\"@gmail.com", 
         "[email protected]", 
         "ğüşıöçĞÜŞİÖÇ@gmail.com",
         "a#[email protected]",
         "*****@*****.**",
         "*****@*****.**")]
     string email)
 {
     EmailValidator emailValidator = new EmailValidator();
     Assert.AreEqual(true, emailValidator.IsValid(email), string.Format(CultureInfo.CurrentCulture, "The email address '{0}' should be valid", email));
 }
 public void AssertInvalidEmailAddresses(
     [Values(
         "test@gmail",
         "@gmail.com", 
         "@",
         "*****@*****.**",
         "*****@*****.**",
         "*****@*****.**",
         "[email protected]",
         "*****@*****.**",
         "a@[127.0.0.1].com",
         "*****@*****.**")]
     string email)
 {
     EmailValidator emailValidator = new EmailValidator();
     Assert.AreEqual(false, emailValidator.IsValid(email), string.Format(CultureInfo.CurrentCulture, "The email address '{0}' should be invalid", email));
 }
 public void IsValidShouldReturnTrueWhenTheSpecifiedValueIsNull()
 {
     EmailValidator emailValidator = new EmailValidator();
     Assert.AreEqual(true, emailValidator.IsValid(null));
 }
 public void IsValidShouldReturnFalseWhenTheSpecifiedValueIsNotString()
 {
     EmailValidator emailValidator = new EmailValidator();
     Assert.AreEqual(false, emailValidator.IsValid(100));
     Assert.AreEqual(false, emailValidator.IsValid(new object()));
 }