Changeset 14122 in josm for trunk/test/unit


Ignore:
Timestamp:
2018-08-11T18:18:58+02:00 (6 years ago)
Author:
Don-vip
Message:

see #15229 - minor preferences refactoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java

    r14120 r14122  
    4040import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    4141import org.openstreetmap.josm.gui.util.GuiHelper;
     42import org.openstreetmap.josm.spi.preferences.Config;
    4243import org.openstreetmap.josm.testutils.ImagePatternMatching;
    4344import org.openstreetmap.josm.testutils.JOSMTestRules;
     
    225226    @Test
    226227    public void testSourcePrefObeyed() throws Exception {
    227         Main.pref.put("slippy_map_chooser.mapstyle", "Green Tiles");
     228        Config.getPref().put("slippy_map_chooser.mapstyle", "Green Tiles");
    228229
    229230        this.setUpMiniMap();
     
    252253    @Test
    253254    public void testSourcePrefInvalid() throws Exception {
    254         Main.pref.put("slippy_map_chooser.mapstyle", "Hooloovoo Tiles");
     255        Config.getPref().put("slippy_map_chooser.mapstyle", "Hooloovoo Tiles");
    255256
    256257        this.setUpMiniMap();
     
    277278        MainApplication.getLayerManager().addLayer(new TestLayer());
    278279
    279         Main.pref.put("slippy_map_chooser.mapstyle", "White Tiles");
     280        Config.getPref().put("slippy_map_chooser.mapstyle", "White Tiles");
    280281        // ensure projection matches JMapViewer's
    281282        ProjectionRegistry.setProjection(Projections.getProjectionByCode("EPSG:3857"));
     
    415416    @Test
    416417    public void testShowDownloadedArea() throws Exception {
    417         Main.pref.put("slippy_map_chooser.mapstyle", "Green Tiles");
    418         Main.pref.putBoolean("slippy_map_chooser.show_downloaded_area", false);
     418        Config.getPref().put("slippy_map_chooser.mapstyle", "Green Tiles");
     419        Config.getPref().putBoolean("slippy_map_chooser.show_downloaded_area", false);
    419420
    420421        DataSet dataSet = new DataSet();
     
    574575    @Test
    575576    public void testShowDownloadedAreaLayerSwitching() throws Exception {
    576         Main.pref.put("slippy_map_chooser.mapstyle", "Green Tiles");
    577         Main.pref.putBoolean("slippy_map_chooser.show_downloaded_area", true);
     577        Config.getPref().put("slippy_map_chooser.mapstyle", "Green Tiles");
     578        Config.getPref().putBoolean("slippy_map_chooser.show_downloaded_area", true);
    578579
    579580        DataSet dataSetA = new DataSet();
Note: See TracChangeset for help on using the changeset viewer.