kopia lustrzana https://github.com/JOSM/MapWithAI
Apply a workaround for JOSM-19132
Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head
rodzic
0f18d8c9d7
commit
e3197bb6da
|
@ -47,6 +47,7 @@ import org.openstreetmap.josm.plugins.mapwithai.data.mapwithai.MapWithAIInfo;
|
|||
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.tools.Territories;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
|
||||
|
@ -65,6 +66,7 @@ public class MapWithAILayerTest {
|
|||
@Before
|
||||
public void setUp() {
|
||||
layer = new MapWithAILayer(new DataSet(), "test", null);
|
||||
Territories.initialize(); // Required to avoid an NPE (see JOSM-19132)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -74,8 +74,8 @@ public class MapWithAITestRules extends JOSMTestRules {
|
|||
private static void setupMapWithAILayerInfo(WireMockServer wireMockServer) {
|
||||
synchronized (MapWithAITestRules.class) {
|
||||
resetMapWithAILayerInfo();
|
||||
MapWithAILayerInfo.instance.getLayers().stream()
|
||||
.forEach(i -> i.setUrl(GetDataRunnableTest.getDefaultMapWithAIAPIForTest(wireMockServer, i.getUrl())));
|
||||
MapWithAILayerInfo.instance.getLayers().stream().forEach(
|
||||
i -> i.setUrl(GetDataRunnableTest.getDefaultMapWithAIAPIForTest(wireMockServer, i.getUrl())));
|
||||
MapWithAILayerInfo.instance.save();
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue