public void TestCorrectEmailFormats() { Assert.IsTrue(Prueba1.ValidarEmail("[email protected]")); Assert.IsTrue(Prueba1.ValidarEmail("*****@*****.**")); Assert.IsTrue(Prueba1.ValidarEmail("*****@*****.**")); Assert.IsTrue(Prueba1.ValidarEmail("abcdefghijklmnoprstuvwxyz0123456789.!#$%&'*+-/=?^_`{|}[email protected]")); }
public void TestIncorrectCorrectEmailFormats() { Assert.IsFalse(Prueba1.ValidarEmail("this is not an email")); Assert.IsFalse(Prueba1.ValidarEmail("@b.c")); Assert.IsFalse(Prueba1.ValidarEmail("test@domain@com")); Assert.IsFalse(Prueba1.ValidarEmail("*****@*****.**")); Assert.IsFalse(Prueba1.ValidarEmail("<::>@fail.test")); Assert.IsFalse(Prueba1.ValidarEmail("test.with.á[email protected]")); }