AddressTest: Add test for parsing email address at new TLD

Change I27a538d5b upgraded commons-validator to a later version
that correctly parses email addresses at new top level domains,
for example "username@example.systems".

Add a test in AddressTest to make sure email address parsing can
also correctly handle such email addresses.  Note that this was
not known to be broken before, so it is not expected to fail if
I27a538d5b is not present.

Change-Id: I20027f170cbfe28b99d2437f6bc05a39d6e8eae0
This commit is contained in:
David Pursehouse 2015-05-27 15:20:53 +09:00
parent d69ddf3e23
commit 0fe430cc4e

View File

@ -75,6 +75,13 @@ public class AddressTest {
assertThat(a.email).isEqualTo("a@b");
}
@Test
public void testParse_NewTLD() {
Address a = Address.parse("A U Thor <author@example.systems>");
assertThat(a.name).isEqualTo("A U Thor");
assertThat(a.email).isEqualTo("author@example.systems");
}
@Test
public void testParseInvalid() {
assertInvalid("");