From 25c378ea3488e38ff02bb49c36674c5e7673394e Mon Sep 17 00:00:00 2001 From: Taylor Smock Date: Thu, 28 May 2020 12:59:43 -0600 Subject: [PATCH] Add WindowMockers (now required due to a dependency from MapWithAIDownloadOptions) Signed-off-by: Taylor Smock --- .../josm/plugins/mapwithai/MapWithAIPluginTest.java | 2 ++ .../mapwithai/gui/download/MapWithAIDownloadReaderTest.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/test/unit/org/openstreetmap/josm/plugins/mapwithai/MapWithAIPluginTest.java b/test/unit/org/openstreetmap/josm/plugins/mapwithai/MapWithAIPluginTest.java index ae39fd6..7d22ab0 100644 --- a/test/unit/org/openstreetmap/josm/plugins/mapwithai/MapWithAIPluginTest.java +++ b/test/unit/org/openstreetmap/josm/plugins/mapwithai/MapWithAIPluginTest.java @@ -26,6 +26,7 @@ import org.openstreetmap.josm.plugins.mapwithai.gui.preferences.MapWithAIPrefere import org.openstreetmap.josm.plugins.mapwithai.testutils.MapWithAITestRules; import org.openstreetmap.josm.spi.preferences.Config; import org.openstreetmap.josm.testutils.JOSMTestRules; +import org.openstreetmap.josm.testutils.mockers.WindowMocker; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; @@ -47,6 +48,7 @@ public class MapWithAIPluginTest { */ @Before public void setUp() throws Exception { + new WindowMocker(); final InputStream in = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8)); info = new PluginInformation(in, "MapWithAI", null); info.localversion = VERSION; diff --git a/test/unit/org/openstreetmap/josm/plugins/mapwithai/gui/download/MapWithAIDownloadReaderTest.java b/test/unit/org/openstreetmap/josm/plugins/mapwithai/gui/download/MapWithAIDownloadReaderTest.java index d713413..5b83de0 100644 --- a/test/unit/org/openstreetmap/josm/plugins/mapwithai/gui/download/MapWithAIDownloadReaderTest.java +++ b/test/unit/org/openstreetmap/josm/plugins/mapwithai/gui/download/MapWithAIDownloadReaderTest.java @@ -26,6 +26,7 @@ import org.openstreetmap.josm.plugins.mapwithai.backend.MapWithAIPreferenceHelpe import org.openstreetmap.josm.plugins.mapwithai.gui.download.MapWithAIDownloadReader.MapWithAIDownloadData; import org.openstreetmap.josm.plugins.mapwithai.testutils.MapWithAITestRules; import org.openstreetmap.josm.testutils.JOSMTestRules; +import org.openstreetmap.josm.testutils.mockers.WindowMocker; import org.openstreetmap.josm.tools.ImageProvider; public class MapWithAIDownloadReaderTest { @@ -44,6 +45,7 @@ public class MapWithAIDownloadReaderTest { @Test public void testDoDownload() { + new WindowMocker(); MapWithAIDownloadReader reader = new MapWithAIDownloadReader(); // TODO revert commit that adds these lines as soon as MapWithAI fixes timeout // issue see