Changeset 12556 in josm for trunk/test/unit


Ignore:
Timestamp:
2017-08-02T02:08:36+02:00 (7 years ago)
Author:
Don-vip
Message:

speedup RightAndLefthandTrafficTest

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

Legend:

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

    r12545 r12556  
    2727import org.openstreetmap.josm.tools.Logging;
    2828import org.openstreetmap.josm.tools.MemoryManagerTest;
     29import org.openstreetmap.josm.tools.RightAndLefthandTraffic;
    2930import org.openstreetmap.josm.tools.Territories;
    3031import org.openstreetmap.josm.tools.date.DateUtils;
     
    5354    private boolean useHttps;
    5455    private boolean territories;
     56    private boolean rlTraffic;
    5557
    5658    /**
     
    193195    public JOSMTestRules territories() {
    194196        territories = true;
     197        return this;
     198    }
     199
     200    /**
     201     * Use right and lefthand traffic dataset in this test.
     202     * @return this instance, for easy chaining
     203     * @since 12556
     204     */
     205    public JOSMTestRules rlTraffic() {
     206        rlTraffic = true;
    195207        return this;
    196208    }
     
    290302        if (territories) {
    291303            Territories.initialize();
     304        }
     305
     306        if (rlTraffic) {
     307            RightAndLefthandTraffic.initialize();
    292308        }
    293309
  • trunk/test/unit/org/openstreetmap/josm/tools/RightAndLefthandTrafficTest.java

    r11921 r12556  
    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().rlTraffic();
    2424
    2525    /**
Note: See TracChangeset for help on using the changeset viewer.