Ignore:
Timestamp:
2016-04-10T13:37:15+02:00 (8 years ago)
Author:
Don-vip
Message:

increase code coverage

Location:
trunk/test/unit/org/openstreetmap/josm/data/validation/routines
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/validation/routines/DomainValidatorTest.java

    r9967 r10133  
    2020import static org.junit.Assert.assertFalse;
    2121import static org.junit.Assert.assertNotNull;
     22import static org.junit.Assert.assertNull;
    2223import static org.junit.Assert.assertTrue;
    2324import static org.junit.Assert.fail;
     
    478479        return sorted && strictlySorted && lowerCase;
    479480    }
     481
     482    /**
     483     * Unit test of {@link DomainValidator#getValidatorName}.
     484     */
     485    @Test
     486    public void testValidatorName() {
     487        assertNull(DomainValidator.getInstance().getValidatorName());
     488    }
    480489}
  • trunk/test/unit/org/openstreetmap/josm/data/validation/routines/EmailValidatorTest.java

    r9853 r10133  
    574574        assertTrue(validator.isValid("abc@school.school"));
    575575    }
     576
     577    /**
     578     * Unit test of {@link EmailValidator#getValidatorName}.
     579     */
     580    @Test
     581    public void testValidatorName() {
     582        assertEquals("Email validator", EmailValidator.getInstance().getValidatorName());
     583    }
    576584}
  • trunk/test/unit/org/openstreetmap/josm/data/validation/routines/InetAddressValidatorTest.java

    r9853 r10133  
    1919
    2020import static org.junit.Assert.assertFalse;
     21import static org.junit.Assert.assertNull;
    2122import static org.junit.Assert.assertTrue;
    2223
     
    615616    // CHECKSTYLE.ON: MethodLengthCheck
    616617    // CHECKSTYLE.ON: LineLength
     618
     619    /**
     620     * Unit test of {@link InetAddressValidator#getValidatorName}.
     621     */
     622    @Test
     623    public void testValidatorName() {
     624        assertNull(new InetAddressValidator().getValidatorName());
     625    }
    617626}
  • trunk/test/unit/org/openstreetmap/josm/data/validation/routines/RegexValidatorTest.java

    r9967 r10133  
    257257
    258258    /**
     259     * Unit test of {@link RegexValidator#getValidatorName}.
     260     */
     261    @Test
     262    public void testValidatorName() {
     263        assertNull(new RegexValidator(".*").getValidatorName());
     264    }
     265
     266    /**
    259267     * Compare two arrays
    260268     * @param label Label for the test
  • trunk/test/unit/org/openstreetmap/josm/data/validation/routines/UrlValidatorTest.java

    r9967 r10133  
    546546   }
    547547
     548   /**
     549    * Unit test of {@link UrlValidator#getValidatorName}.
     550    */
     551   @Test
     552   public void testValidatorName() {
     553       assertEquals("URL validator", UrlValidator.getInstance().getValidatorName());
     554   }
     555
    548556   //-------------------- Test data for creating a composite URL
    549557   /**
Note: See TracChangeset for help on using the changeset viewer.