Changeset 33864 in osm for applications


Ignore:
Timestamp:
2017-11-22T00:18:31+01:00 (7 years ago)
Author:
donvip
Message:

fix deprecation warnings

Location:
applications/editors/josm/plugins/ImportImagePlugin/test/unit/org/openstreetmap/josm/plugins/ImportImagePlugin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/ImportImagePlugin/test/unit/org/openstreetmap/josm/plugins/ImportImagePlugin/GeoTiffReaderTest.java

    r33028 r33864  
    1717import org.junit.Rule;
    1818import org.junit.Test;
    19 import org.openstreetmap.josm.Main;
    2019import org.openstreetmap.josm.TestUtils;
    2120import org.openstreetmap.josm.testutils.JOSMTestRules;
     21import org.openstreetmap.josm.tools.Logging;
    2222
    2323/**
     
    3737        for (Path p : listDataFiles("tif")) {
    3838            File file = p.toFile();
    39             Main.info("Testing reading file "+file.getPath());
     39            Logging.info("Testing reading file "+file.getPath());
    4040            GridCoverage2D grid = PluginOperations.createGridFromFile(file, null, false);
    4141            assertNotNull(grid);
  • applications/editors/josm/plugins/ImportImagePlugin/test/unit/org/openstreetmap/josm/plugins/ImportImagePlugin/ImageLayerTest.java

    r33372 r33864  
    1010import org.junit.Rule;
    1111import org.junit.Test;
    12 import org.openstreetmap.josm.Main;
    1312import org.openstreetmap.josm.TestUtils;
     13import org.openstreetmap.josm.gui.MainApplication;
    1414import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    1515import org.openstreetmap.josm.io.OsmReader;
     
    3434    @Test
    3535    public void testTicket14894() throws Exception {
    36         assertTrue(Main.getLayerManager().getLayers().isEmpty());
     36        assertTrue(MainApplication.getLayerManager().getLayers().isEmpty());
    3737        // Step 1: add .osm layer
    3838        try (InputStream in = TestUtils.getRegressionDataStream(14894, "14894.osm")) {
    39             Main.getLayerManager().addLayer(new OsmDataLayer(OsmReader.parseDataSet(in, null), "14894", null));
     39            MainApplication.getLayerManager().addLayer(new OsmDataLayer(OsmReader.parseDataSet(in, null), "14894", null));
    4040        }
    4141        // Step 2: try to import image
    42         Main.getLayerManager().addLayer(new ImageLayer(new File(TestUtils.getRegressionDataFile(14894, "14894.png"))));
    43         assertEquals(2, Main.getLayerManager().getLayers().size());
     42        MainApplication.getLayerManager().addLayer(new ImageLayer(new File(TestUtils.getRegressionDataFile(14894, "14894.png"))));
     43        assertEquals(2, MainApplication.getLayerManager().getLayers().size());
    4444    }
    4545}
Note: See TracChangeset for help on using the changeset viewer.