Changeset 13021 in josm for trunk/test


Ignore:
Timestamp:
2017-10-18T17:25:29+02:00 (3 years ago)
Author:
bastiK
Message:

make Preferences more generic (see #15229, closes #15451)

  • extract base directories
  • move updateSystemProperties() as it is specific to JOSM-core as a "prefefences client"
Location:
trunk/test/unit/org/openstreetmap/josm
Files:
2 edited

Legend:

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

    r12855 r13021  
    1616import org.openstreetmap.josm.actions.DeleteAction;
    1717import org.openstreetmap.josm.command.DeleteCommand;
     18import org.openstreetmap.josm.data.preferences.JosmBaseDirectories;
    1819import org.openstreetmap.josm.data.projection.Projections;
    1920import org.openstreetmap.josm.gui.MainApplication;
     
    9899        TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
    99100        Config.setPreferencesInstance(Main.pref);
    100         Config.setBaseDirectoriesProvider(Main.pref);
     101        Config.setBaseDirectoriesProvider(JosmBaseDirectories.getInstance());
    101102        Main.pref.resetToInitialState();
    102103        Main.pref.enableSaveOnPut(false);
  • trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java

    r12855 r13021  
    2020import org.openstreetmap.josm.data.osm.User;
    2121import org.openstreetmap.josm.data.osm.event.SelectionEventManager;
     22import org.openstreetmap.josm.data.preferences.JosmBaseDirectories;
    2223import org.openstreetmap.josm.data.projection.Projections;
    2324import org.openstreetmap.josm.gui.MainApplication;
     
    3132import org.openstreetmap.josm.io.OsmConnection;
    3233import org.openstreetmap.josm.io.OsmTransferCanceledException;
     34import org.openstreetmap.josm.spi.preferences.Config;
    3335import org.openstreetmap.josm.tools.I18n;
    3436import org.openstreetmap.josm.tools.JosmRuntimeException;
     
    4042
    4143import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    42 import org.openstreetmap.josm.spi.preferences.Config;
    4344
    4445/**
     
    278279
    279280        Config.setPreferencesInstance(Main.pref);
    280         Config.setBaseDirectoriesProvider(Main.pref);
     281        Config.setBaseDirectoriesProvider(JosmBaseDirectories.getInstance());
    281282        // All tests use the same timezone.
    282283        TimeZone.setDefault(DateUtils.UTC);
Note: See TracChangeset for help on using the changeset viewer.