Changeset 9853 in josm for trunk/test


Ignore:
Timestamp:
2016-02-23T01:09:36+01:00 (9 years ago)
Author:
Don-vip
Message:

fix #12557 : update to Apache Commons Validator 1.5.0 + updates from trunk + unit/integration tests + anticipated patches to add missing TLDs and Country Codes from IANA

Location:
trunk/test/unit/org/openstreetmap/josm/data/validation
Files:
8 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/InternetTagsTest.java

    r7937 r9853  
    3131
    3232    /**
    33      * Test of "Internet Tags" validation test.
     33     * Test of valid URLs.
    3434     */
    3535    @Test
    36     public void test() {
    37 
    38         // Valid URLs
     36    public void testValidUrls() {
    3937        testUrl("url", "www.domain.com", true);                                // No protocol
    4038        testUrl("url", "http://josm.openstreetmap.de", true);                  // Simple HTTP
     
    4745        testUrl("website", "http://золотаяцепь.рф", true);                     // see #10862: IDN URL in Unicode form
    4846        testUrl("website", "http://золотаяцепь.рф/", true);                    // see #10862: IDN URL in Unicode form + slash
     47        testUrl("website", "http://www.dasideenreich.online", true);           // see #12257: new TLD added August 19, 2015
     48    }
    4949
    50         // Invalid URLs
     50    /**
     51     * Test of invalid URLs.
     52     */
     53    @Test
     54    public void testInvalidUrls() {
    5155        testUrl("url", "something://www.domain.com", false);                   // invalid protocol
    5256        testUrl("url", "http://www.domain.invalidtld", false);                 // invalid TLD
     57    }
    5358
    54         // Valid E-mails
     59    /**
     60     * Test of valid e-mails.
     61     */
     62    @Test
     63    public void testValidEmails() {
    5564        testEmail("email", "contact@www.domain.com", true);                    // Simple email
    5665        testEmail("contact:email", "john.doe@other-domain.org", true);         // Key with : + dash in domain
     66    }
    5767
    58         // Invalid E-mails
     68    /**
     69     * Test of invalid e-mails.
     70     */
     71    @Test
     72    public void testInvalidEmails() {
    5973        testEmail("email", "contact at www.domain.com", false);                // No @
    6074        testEmail("contact:email", "john.doe@other-domain.invalidtld", false); // invalid TLD
Note: See TracChangeset for help on using the changeset viewer.