List of mock valid/invalid Email Addresses for Unit Tests

前端 未结 4 1992
一个人的身影
一个人的身影 2021-02-03 21:47

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

相关标签:
4条回答
  • 2021-02-03 21:49

    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.

    0 讨论(0)
  • 2021-02-03 21:50

    Check the tests of the Apache Commons EmailValidator class:

    • EmailTest,
    • EmailValidatorTest.

    The EmailValidatorTest in the Hibernate Validator also contains some address.

    0 讨论(0)
  • 2021-02-03 22:03

    I believe you were looking for something like this:

    List of Valid and Invalid Email Addresses

    0 讨论(0)
  • 2021-02-03 22:04

    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

    0 讨论(0)
提交回复
热议问题