Ignore:
Timestamp:
2019-10-01T02:20:06+02:00 (5 years ago)
Author:
Don-vip
Message:

Force metric measurement system only in tests requiring it as it creates a new preference entry

File:
1 edited

Legend:

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

    r15399 r15400  
    101101    private boolean territories;
    102102    private boolean rlTraffic;
     103    private boolean metric;
    103104    private boolean main;
    104105
     
    283284        territories();
    284285        rlTraffic = true;
     286        return this;
     287    }
     288
     289    /**
     290     * Force metric measurement system.
     291     * @return this instance, for easy chaining
     292     * @since 15400
     293     */
     294    public JOSMTestRules metricSystem() {
     295        metric = true;
    285296        return this;
    286297    }
     
    502513
    503514        // Make sure we're using the metric system
    504         SystemOfMeasurement.setSystemOfMeasurement(SystemOfMeasurement.METRIC.getName());
     515        if (metric) {
     516            SystemOfMeasurement.setSystemOfMeasurement(SystemOfMeasurement.METRIC.getName());
     517        }
    505518
    506519        if (useHttps) {
Note: See TracChangeset for help on using the changeset viewer.