17
17
import java .nio .file .Files ;
18
18
import java .nio .file .Paths ;
19
19
import java .util .ArrayList ;
20
- import java .util .Arrays ;
21
20
import java .util .Collections ;
22
21
import java .util .List ;
23
22
import java .util .concurrent .TimeUnit ;
24
23
25
- import com .github .tomakehurst .wiremock .WireMockServer ;
26
- import com .github .tomakehurst .wiremock .client .WireMock ;
27
24
import org .apache .commons .io .FileUtils ;
28
25
import org .junit .jupiter .api .Disabled ;
29
26
import org .junit .jupiter .api .Test ;
47
44
import org .openstreetmap .josm .testutils .annotations .Projection ;
48
45
import org .openstreetmap .josm .tools .ReflectionUtils ;
49
46
47
+ import com .github .tomakehurst .wiremock .WireMockServer ;
48
+ import com .github .tomakehurst .wiremock .client .WireMock ;
49
+
50
50
/**
51
51
* Unit tests for class {@link WMTSTileSource}.
52
52
*/
@@ -275,9 +275,7 @@ void testProjectionWithENUAxis() throws IOException, WMTSGetCapabilitiesExceptio
275
275
void testTwoTileSetsForOneProjection () throws Exception {
276
276
ProjectionRegistry .setProjection (Projections .getProjectionByCode ("EPSG:3857" ));
277
277
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" )));
281
279
WMTSTileSource testSource = new WMTSTileSource (ontario );
282
280
testSource .initProjection (ProjectionRegistry .getProjection ());
283
281
assertEquals (
@@ -292,9 +290,9 @@ void testTwoTileSetsForOneProjection() throws Exception {
292
290
void testTwoTileSetsForOneProjectionSecondLayer () throws Exception {
293
291
ProjectionRegistry .setProjection (Projections .getProjectionByCode ("EPSG:3857" ));
294
292
ImageryInfo ontario = getImagery (TestUtils .getTestDataRoot () + "wmts/WMTSCapabilities-Ontario.xml" );
295
- ontario .setDefaultLayers (Arrays . asList ( new DefaultLayer [] {
293
+ ontario .setDefaultLayers (Collections . singletonList (
296
294
new DefaultLayer (ImageryType .WMTS , "Basemap_Imagery_2014" , null , "GoogleMapsCompatible" )
297
- } ));
295
+ ));
298
296
WMTSTileSource testSource = new WMTSTileSource (ontario );
299
297
testSource .initProjection (ProjectionRegistry .getProjection ());
300
298
assertEquals (
@@ -392,6 +390,7 @@ void testDefaultLayer() throws Exception {
392
390
"<name>Landsat</name>\n " +
393
391
"<id>landsat</id>\n " +
394
392
"<type>wmts</type>\n " +
393
+ "<category>photo</category>\n " +
395
394
"<url><![CDATA[" + tileServer .url ("/getcapabilities.xml" ) + "]]></url>\n " +
396
395
"<default-layers>" +
397
396
"<layer name=\" GEOGRAPHICALGRIDSYSTEMS.MAPS\" />" +
0 commit comments