Changeset 18686 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2023-03-08T20:00:36+01:00 (20 months ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialogTest.java
r18685 r18686 21 21 import javax.swing.JPanel; 22 22 23 import org.junit.jupiter.api.AfterEach; 23 24 import org.junit.jupiter.api.BeforeEach; 24 25 import org.junit.jupiter.api.extension.RegisterExtension; … … 44 45 45 46 private ImageViewerDialog dialog; 47 46 48 @BeforeEach 47 49 void setup() { 48 50 this.dialog = ImageViewerDialog.getInstance(); 49 51 this.dialog.displayImages(null); 52 } 53 54 @AfterEach 55 void tearDown() { 56 this.dialog.destroy(); 50 57 } 51 58 -
trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/ImagesLoaderTest.java
r18035 r18686 10 10 import java.util.List; 11 11 12 import org.junit.jupiter.api.AfterEach; 12 13 import org.junit.jupiter.api.Test; 13 import org.junit.jupiter.api.extension.RegisterExtension;14 14 import org.openstreetmap.josm.TestUtils; 15 15 import org.openstreetmap.josm.gui.MainApplication; 16 16 import org.openstreetmap.josm.gui.layer.GpxLayer; 17 17 import org.openstreetmap.josm.io.GpxReader; 18 import org.openstreetmap.josm.testutils.JOSMTestRules; 19 20 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 18 import org.openstreetmap.josm.testutils.annotations.BasicPreferences; 21 19 22 20 /** 23 21 * Unit tests of {@link ImagesLoader} class. 24 22 */ 23 @BasicPreferences 25 24 class ImagesLoaderTest { 26 25 27 /**28 * We need prefs for this.29 */30 @RegisterExtension31 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")32 public JOSMTestRules test = new JOSMTestRules().preferences();26 @AfterEach 27 void tearDown() { 28 if (ImageViewerDialog.hasInstance()) { 29 ImageViewerDialog.getInstance().destroy(); 30 } 31 } 33 32 34 33 /** -
trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/WikimediaCommonsLoaderTest.java
r18050 r18686 11 11 import java.util.List; 12 12 13 import org.junit.jupiter.api.AfterEach; 13 14 import org.junit.jupiter.api.BeforeAll; 14 15 import org.junit.jupiter.api.Test; … … 29 30 static void beforeAll() { 30 31 HttpClient.setFactory(Http1Client::new); 32 } 33 34 @AfterEach 35 void tearDown() { 36 if (ImageViewerDialog.hasInstance()) { 37 ImageViewerDialog.getInstance().destroy(); 38 } 31 39 } 32 40
Note:
See TracChangeset
for help on using the changeset viewer.