Does anyone know of a list of email addresses (which don’t need to be real) I can use for an email validation assembly for a unit test?
I’ve been looking for such a list and can’t seem to find one. I’m not looking for real addresses, just ones that fit, and the more things I can throw at the test the better. I’ve got 10 right now, but if there is a list, it would give me a more thorough test.
I believe you were looking for something like this:
List of Valid and Invalid Email Addresses
Check the tests of the Apache Commons EmailValidator class:
EmailTest
,
EmailValidatorTest
.
The EmailValidatorTest
in the Hibernate Validator also contains some address.
I like to use the set in this page on email validating regexes because the addresses contain what they're testing inside the email address.
Here is a set of test emails that Dominic Sayers uses to test his isEmail validator:
http://code.iamcal.com/php/rfc822/tests/
For more on isEmail:
http://isemail.info/about