Changeset 10378 in josm for trunk/test/unit/org/openstreetmap/josm/data/validation/routines/EmailValidatorTest.java
- Timestamp:
- 2016-06-15T10:30:37+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/validation/routines/EmailValidatorTest.java
r10338 r10378 58 58 */ 59 59 @Test 60 public void testEmail() 60 public void testEmail() { 61 61 assertTrue(validator.isValid("jsmith@apache.org")); 62 62 assertFalse(validator.isValid(null)); … … 67 67 */ 68 68 @Test 69 public void testEmailWithNumericAddress() 69 public void testEmailWithNumericAddress() { 70 70 assertTrue(validator.isValid("someone@[216.109.118.76]")); 71 71 assertTrue(validator.isValid("someone@yahoo.com")); … … 76 76 */ 77 77 @Test 78 public void testEmailExtension() 78 public void testEmailExtension() { 79 79 assertTrue(validator.isValid("jsmith@apache.org")); 80 80 … … 99 99 */ 100 100 @Test 101 public void testEmailWithDash() 101 public void testEmailWithDash() { 102 102 assertTrue(validator.isValid("andy.noble@data-workshop.com")); 103 103 … … 114 114 */ 115 115 @Test 116 public void testEmailWithDotEnd() 116 public void testEmailWithDotEnd() { 117 117 assertFalse(validator.isValid("andy.noble@data-workshop.com.")); 118 118 } … … 123 123 */ 124 124 @Test 125 public void testEmailWithBogusCharacter() 125 public void testEmailWithBogusCharacter() { 126 126 127 127 assertFalse(validator.isValid("andy.noble@\u008fdata-workshop.com")); … … 184 184 */ 185 185 @Test 186 public void testEmailWithCommas() 186 public void testEmailWithCommas() { 187 187 assertFalse(validator.isValid("joeblow@apa,che.org")); 188 188 … … 196 196 */ 197 197 @Test 198 public void testEmailWithSpaces() 198 public void testEmailWithSpaces() { 199 199 assertFalse(validator.isValid("joeblow @apache.org")); // TODO - this should be valid? 200 200 … … 215 215 */ 216 216 @Test 217 public void testEmailWithControlChars() 217 public void testEmailWithControlChars() { 218 218 for (char c = 0; c < 32; c++) { 219 219 assertFalse("Test control char " + ((int) c), validator.isValid("foo" + c + "bar@domain.com")); … … 278 278 */ 279 279 @Test 280 public void testEmailUserName() 280 public void testEmailUserName() { 281 281 282 282 assertTrue(validator.isValid("joe1blow@apache.org")); … … 492 492 @Ignore("This test fails so disable it for 1.1.4 release. The real solution is to fix the email parsing") 493 493 @Test 494 public void testEmailFromPerl() 494 public void testEmailFromPerl() { 495 495 for (int index = 0; index < testEmailFromPerl.length; index++) { 496 496 String item = testEmailFromPerl[index].item;
Note:
See TracChangeset
for help on using the changeset viewer.