Changeset 36013 in osm for applications/editors/josm/plugins/ImportImagePlugin/test
- Timestamp:
- 2022-08-04T15:43:42+02:00 (2 years ago)
- 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
r33864 r36013 2 2 package org.openstreetmap.josm.plugins.ImportImagePlugin; 3 3 4 import static org.junit. Assert.assertNotNull;4 import static org.junit.jupiter.api.Assertions.assertNotNull; 5 5 6 6 import java.io.File; … … 15 15 16 16 import org.geotools.coverage.grid.GridCoverage2D; 17 import org.junit. Rule;18 import org.junit. Test;17 import org.junit.jupiter.api.Test; 18 import org.junit.jupiter.api.Timeout; 19 19 import org.openstreetmap.josm.TestUtils; 20 import org.openstreetmap.josm.testutils. JOSMTestRules;20 import org.openstreetmap.josm.testutils.annotations.BasicPreferences; 21 21 import org.openstreetmap.josm.tools.Logging; 22 22 … … 25 25 * Data downloaded from <a href="ftp://ftp.remotesensing.org/pub/geotiff/samples">remotesensing.org</a>. 26 26 */ 27 public class GeoTiffReaderTest { 28 29 /** 30 * Setup test. 31 */ 32 @Rule 33 public JOSMTestRules rules = new JOSMTestRules().preferences().timeout(20000); 34 27 @BasicPreferences 28 @Timeout(20) 29 class GeoTiffReaderTest { 35 30 @Test 36 publicvoid testReadGeoTiffFiles() throws IOException {31 void testReadGeoTiffFiles() throws IOException { 37 32 for (Path p : listDataFiles("tif")) { 38 33 File file = p.toFile(); … … 46 41 * Lists all datasets files matching given extension. 47 42 * @param ext file extension to search for 48 * @return sList of all datasets files matching given extension43 * @return List of all datasets files matching given extension 49 44 * @throws IOException in case of I/O error 50 45 */ -
applications/editors/josm/plugins/ImportImagePlugin/test/unit/org/openstreetmap/josm/plugins/ImportImagePlugin/ImageLayerTest.java
r33864 r36013 2 2 package org.openstreetmap.josm.plugins.ImportImagePlugin; 3 3 4 import static org.junit. Assert.assertEquals;5 import static org.junit. Assert.assertTrue;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertTrue; 6 6 7 7 import java.io.File; 8 8 import java.io.InputStream; 9 9 10 import org.junit. Rule;11 import org.junit. Test;10 import org.junit.jupiter.api.Test; 11 import org.junit.jupiter.api.extension.RegisterExtension; 12 12 import org.openstreetmap.josm.TestUtils; 13 13 import org.openstreetmap.josm.gui.MainApplication; … … 15 15 import org.openstreetmap.josm.io.OsmReader; 16 16 import org.openstreetmap.josm.testutils.JOSMTestRules; 17 import org.openstreetmap.josm.testutils.annotations.BasicPreferences; 17 18 18 19 /** … … 20 21 * Data downloaded from <a href="ftp://ftp.remotesensing.org/pub/geotiff/samples">remotesensing.org</a>. 21 22 */ 22 public class ImageLayerTest { 23 @BasicPreferences 24 class ImageLayerTest { 23 25 24 26 /** 25 27 * Setup test. 26 28 */ 27 @R ule28 public JOSMTestRules rules = new JOSMTestRules().preferences().projection();29 @RegisterExtension 30 static JOSMTestRules rules = new JOSMTestRules().projection(); 29 31 30 32 /** … … 33 35 */ 34 36 @Test 35 publicvoid testTicket14894() throws Exception {37 void testTicket14894() throws Exception { 36 38 assertTrue(MainApplication.getLayerManager().getLayers().isEmpty()); 37 39 // Step 1: add .osm layer
Note:
See TracChangeset
for help on using the changeset viewer.