Update EmailValidationUnitTest.java

This commit is contained in:
Ashish Gupta
2021-09-12 14:53:30 +05:30
committed by GitHub
parent e8ae5d9f1b
commit 34c2e1947f

View File

@@ -72,8 +72,8 @@ public class EmailValidationUnitTest {
@Test
public void testGmailSpecialCase() {
emailAddress = "username+something@domain.com";
regexPattern = "^(?=.{1,64}@)[A-Za-z0-9_-+]+(\\\\.[A-Za-z0-9_-+]+)*@[^-][A-Za-z0-9-+]+"
+ "(\\\\.[A-Za-z0-9-+]+)*(\\\\.[A-Za-z]{2,})$\r\n";
regexPattern = "^(?=.{1,64}@)[A-Za-z0-9\\+_-]+(\\.[A-Za-z0-9\\+_-]+)*@"
+ "[^-][A-Za-z0-9\\+-]+(\\.[A-Za-z0-9\\+-]+)*(\\.[A-Za-z]{2,})$";
assertTrue(EmailValidation.patternMatches(emailAddress, regexPattern));
}
}