Changeset 12545 in josm for trunk


Ignore:
Timestamp:
2017-07-31T01:02:55+02:00 (7 years ago)
Author:
Don-vip
Message:

speed up TerritoriesTest

Location:
trunk/test/unit/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java

    r12249 r12545  
    2727import org.openstreetmap.josm.tools.Logging;
    2828import org.openstreetmap.josm.tools.MemoryManagerTest;
     29import org.openstreetmap.josm.tools.Territories;
    2930import org.openstreetmap.josm.tools.date.DateUtils;
    3031
     
    5152    private boolean useMapStyles;
    5253    private boolean useHttps;
     54    private boolean territories;
    5355
    5456    /**
     
    156158
    157159    /**
    158       * Allow the execution of commands using {@link Main#undoRedo}
    159       * @return this instance, for easy chaining
    160       */
     160     * Allow the execution of commands using {@link Main#undoRedo}
     161     * @return this instance, for easy chaining
     162     */
    161163    public JOSMTestRules commands() {
    162164        commands = true;
     
    181183        preferences();
    182184        useMapStyles = true;
     185        return this;
     186    }
     187
     188    /**
     189     * Use boundaries dataset in this test.
     190     * @return this instance, for easy chaining
     191     * @since 12545
     192     */
     193    public JOSMTestRules territories() {
     194        territories = true;
    183195        return this;
    184196    }
     
    274286            // Reset the map paint styles.
    275287            MapPaintStyles.readFromPreferences();
     288        }
     289
     290        if (territories) {
     291            Territories.initialize();
    276292        }
    277293
  • trunk/test/unit/org/openstreetmap/josm/tools/TerritoriesTest.java

    r11921 r12545  
    2121    @Rule
    2222    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    23     public JOSMTestRules rules = new JOSMTestRules().platform().projection().commands();
     23    public JOSMTestRules rules = new JOSMTestRules().platform().projection().territories();
    2424
    2525    /**
Note: See TracChangeset for help on using the changeset viewer.