Changeset 8937 in josm for trunk/test/unit


Ignore:
Timestamp:
2015-10-24T00:54:52+02:00 (9 years ago)
Author:
Don-vip
Message:

add unit tests to check validity of all map paint styles and tagging presets

Location:
trunk/test/unit/org/openstreetmap/josm/gui/preferences
Files:
3 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreferenceTest.java

    r8936 r8937  
    66
    77import java.io.IOException;
     8import java.util.ArrayList;
    89import java.util.Collection;
    910
     
    3536     */
    3637    @Test
    37     public void testValidityOfAvailableSources() throws ParseException, IOException {
     38    public void testValidityOfAvailableRules() throws ParseException, IOException {
    3839        Collection<ExtendedSourceEntry> sources = new ValidatorTagCheckerRulesPreference.TagCheckerRulesSourceEditor()
    3940                .loadAndGetAvailableSources();
    4041        assertFalse(sources.isEmpty());
     42        Collection<Throwable> allErrors = new ArrayList<>();
    4143        MapCSSTagChecker tagChecker = new MapCSSTagChecker();
    4244        for (ExtendedSourceEntry source : sources) {
     
    4446            ParseResult result = tagChecker.addMapCSS(source.url);
    4547            assertFalse(result.parseChecks.isEmpty());
    46             assertTrue(result.parseErrors.isEmpty());
    47             System.out.println(" => OK");
     48            System.out.println(result.parseErrors.isEmpty() ? " => OK" : " => KO");
     49            allErrors.addAll(result.parseErrors);
    4850        }
     51        assertTrue(allErrors.isEmpty());
    4952    }
    5053}
Note: See TracChangeset for help on using the changeset viewer.