Changeset 19077 in josm for trunk/test/unit
- Timestamp:
- 2024-05-13T19:23:43+02:00 (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java
r19052 r19077 16 16 import java.nio.charset.StandardCharsets; 17 17 import java.nio.file.Files; 18 import java.nio.file.Path; 18 19 import java.nio.file.Paths; 19 20 import java.util.ArrayList; … … 22 23 import java.util.concurrent.TimeUnit; 23 24 24 import org.apache.commons.io.FileUtils;25 25 import org.junit.jupiter.api.Disabled; 26 26 import org.junit.jupiter.api.Test; … … 488 488 void testSupportedMimeTypesUrlEncode(String mimeType, @TempDir File temporaryDirectory) 489 489 throws IOException, WMTSGetCapabilitiesException, ReflectiveOperationException { 490 final String data = File Utils.readFileToString(new File(TestUtils.getTestDataRoot() +491 "wmts/bug13975-multiple-tile-matrices-for-one-layer-projection.xml"), StandardCharsets.UTF_8)490 final String data = Files.readString(Paths.get(TestUtils.getTestDataRoot() + 491 "wmts", "bug13975-multiple-tile-matrices-for-one-layer-projection.xml"), StandardCharsets.UTF_8) 492 492 .replace("image/jpgpng", mimeType); 493 File file = new File(temporaryDirectory,"testSupportedMimeTypes.xml");494 File Utils.writeStringToFile(file, data, StandardCharsets.UTF_8);495 WMTSCapabilities capabilities = WMTSTileSource.getCapabilities(file.toU RI().toURL().toExternalForm(), Collections.emptyMap());493 Path file = temporaryDirectory.toPath().resolve("testSupportedMimeTypes.xml"); 494 Files.writeString(file, data, StandardCharsets.UTF_8); 495 WMTSCapabilities capabilities = WMTSTileSource.getCapabilities(file.toUri().toURL().toExternalForm(), Collections.emptyMap()); 496 496 assertEquals(2, capabilities.getLayers().size()); 497 497 Field format = WMTSTileSource.Layer.class.getDeclaredField("format");
Note:
See TracChangeset
for help on using the changeset viewer.