Skip to content

Commit 3f91ca6

Browse files
author
taylor.smock
committedFeb 22, 2024·
See #23485/r18989: Fix broken tests
The tests just needed to have a category set. git-svn-id: https://josm.openstreetmap.de/svn/trunk@18992 0c6e7542-c601-0410-84e7-c038aed88b3b
1 parent c5c4650 commit 3f91ca6

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed
 

‎test/unit/org/openstreetmap/josm/data/imagery/WMSEndpointTileSourceTest.java

+2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ void testDefaultLayerSetInMaps() throws Exception {
7474
"<name>OSM Inspector: Geometry</name>\n" +
7575
"<id>OSM_Inspector-Geometry</id>\n" +
7676
"<type>wms_endpoint</type>\n" +
77+
"<category>qa</category>\n" +
7778
"<url><![CDATA[" + tileServer.url("/capabilities") + "]]></url>\n" +
7879
"<icon>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsSAAALEgHS3X78AAAB5UlEQVQ4y4WTwWsTURDG" +
7980
"fy8W1yYmXZOqtGJJFyGw6KF7CEigwYuS0kthrYUi4i0iORS9BU9hQdA/ILcixVBrwENKLz1FUBB0wWOwYFAqxUNYTZq6BfM8yC5d05iBObz3vfnmm3kz4sqDh/zP" +
@@ -124,6 +125,7 @@ void testCustomHeadersServerSide() throws IOException {
124125
" <name lang=\"nb\">Norge i Bilder (historisk)</name>\n" +
125126
" <id>geovekst-nib-historic</id>\n" +
126127
" <type>wms_endpoint</type>\n" +
128+
" <category>photo</category>\n" +
127129
" <country-code>NO</country-code>\n" +
128130
" <description lang=\"en\">Historic Norwegian orthophotos and maps, courtesy of Geovekst and Norkart.</description>\n" +
129131
" <url><![CDATA[" + tileServer.url("/capabilities?SERVICE=WMS&REQUEST=GetCapabilities") + "]]></url>\n" +

‎test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java

+7-8
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,10 @@
1717
import java.nio.file.Files;
1818
import java.nio.file.Paths;
1919
import java.util.ArrayList;
20-
import java.util.Arrays;
2120
import java.util.Collections;
2221
import java.util.List;
2322
import java.util.concurrent.TimeUnit;
2423

25-
import com.github.tomakehurst.wiremock.WireMockServer;
26-
import com.github.tomakehurst.wiremock.client.WireMock;
2724
import org.apache.commons.io.FileUtils;
2825
import org.junit.jupiter.api.Disabled;
2926
import org.junit.jupiter.api.Test;
@@ -47,6 +44,9 @@
4744
import org.openstreetmap.josm.testutils.annotations.Projection;
4845
import org.openstreetmap.josm.tools.ReflectionUtils;
4946

47+
import com.github.tomakehurst.wiremock.WireMockServer;
48+
import com.github.tomakehurst.wiremock.client.WireMock;
49+
5050
/**
5151
* Unit tests for class {@link WMTSTileSource}.
5252
*/
@@ -275,9 +275,7 @@ void testProjectionWithENUAxis() throws IOException, WMTSGetCapabilitiesExceptio
275275
void testTwoTileSetsForOneProjection() throws Exception {
276276
ProjectionRegistry.setProjection(Projections.getProjectionByCode("EPSG:3857"));
277277
ImageryInfo ontario = getImagery(TestUtils.getTestDataRoot() + "wmts/WMTSCapabilities-Ontario.xml");
278-
ontario.setDefaultLayers(Arrays.asList(new DefaultLayer[] {
279-
new DefaultLayer(ImageryType.WMTS, "Basemap_Imagery_2014", null, "default028mm")
280-
}));
278+
ontario.setDefaultLayers(Collections.singletonList(new DefaultLayer(ImageryType.WMTS, "Basemap_Imagery_2014", null, "default028mm")));
281279
WMTSTileSource testSource = new WMTSTileSource(ontario);
282280
testSource.initProjection(ProjectionRegistry.getProjection());
283281
assertEquals(
@@ -292,9 +290,9 @@ void testTwoTileSetsForOneProjection() throws Exception {
292290
void testTwoTileSetsForOneProjectionSecondLayer() throws Exception {
293291
ProjectionRegistry.setProjection(Projections.getProjectionByCode("EPSG:3857"));
294292
ImageryInfo ontario = getImagery(TestUtils.getTestDataRoot() + "wmts/WMTSCapabilities-Ontario.xml");
295-
ontario.setDefaultLayers(Arrays.asList(new DefaultLayer[] {
293+
ontario.setDefaultLayers(Collections.singletonList(
296294
new DefaultLayer(ImageryType.WMTS, "Basemap_Imagery_2014", null, "GoogleMapsCompatible")
297-
}));
295+
));
298296
WMTSTileSource testSource = new WMTSTileSource(ontario);
299297
testSource.initProjection(ProjectionRegistry.getProjection());
300298
assertEquals(
@@ -392,6 +390,7 @@ void testDefaultLayer() throws Exception {
392390
"<name>Landsat</name>\n" +
393391
"<id>landsat</id>\n" +
394392
"<type>wmts</type>\n" +
393+
"<category>photo</category>\n" +
395394
"<url><![CDATA[" + tileServer.url("/getcapabilities.xml") + "]]></url>\n" +
396395
"<default-layers>" +
397396
"<layer name=\"GEOGRAPHICALGRIDSYSTEMS.MAPS\" />" +

0 commit comments

Comments
 (0)
Please sign in to comment.