Changeset 36140 in osm for applications/viewer/jmapviewer/test/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSourceTest.java
- Timestamp:
- 2023-09-18T14:36:02+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/test/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSourceTest.java
r35527 r36140 2 2 package org.openstreetmap.gui.jmapviewer.tilesources; 3 3 4 import static org.junit. Assert.assertEquals;5 import static org.junit. Assert.assertTrue;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertTrue; 6 6 7 7 import java.text.MessageFormat; … … 11 11 import java.util.stream.Stream; 12 12 13 import org.junit.Test; 13 import org.junit.jupiter.api.Test; 14 14 15 15 /** … … 49 49 */ 50 50 @Test 51 publicvoid testGetTileUrl() {51 void testGetTileUrl() { 52 52 checkGetTileUrl( 53 53 "http://localhost/{z}/{x}/{y}", … … 61 61 */ 62 62 @Test 63 publicvoid testGetTileUrl_positive_zoom() {63 void testGetTileUrl_positive_zoom() { 64 64 checkGetTileUrl( 65 65 "http://localhost/{zoom+5}/{x}/{y}", … … 73 73 */ 74 74 @Test 75 publicvoid testGetTileUrl_negative_zoom() {75 void testGetTileUrl_negative_zoom() { 76 76 checkGetTileUrl( 77 77 "http://localhost/{zoom-5}/{x}/{y}", … … 85 85 */ 86 86 @Test 87 publicvoid testGetTileUrl_inverse_negative_zoom() {87 void testGetTileUrl_inverse_negative_zoom() { 88 88 checkGetTileUrl( 89 89 "http://localhost/{5-zoom}/{x}/{y}", … … 97 97 */ 98 98 @Test 99 publicvoid testGetTileUrl_both_offsets() {99 void testGetTileUrl_both_offsets() { 100 100 checkGetTileUrl( 101 101 "http://localhost/{10-zoom-5}/{x}/{y}", … … 109 109 */ 110 110 @Test 111 publicvoid testGetTileUrl_apiKey() {111 void testGetTileUrl_apiKey() { 112 112 System.setProperty("id1.api-key", "wololo"); 113 113 TileSourceInfo testImageryTMS = new TileSourceInfo("test imagery", "http://localhost/{zoom}/{x}/{y}?token={apikey}&foo=bar", "id1"); … … 120 120 */ 121 121 @Test 122 publicvoid testGetTileUrl_switch() {122 void testGetTileUrl_switch() { 123 123 TileSourceInfo testImageryTMS = new TileSourceInfo("test imagery", "http://{switch:a,b,c}.localhost/{10-zoom-5}/{x}/{y}", "id1"); 124 124 TemplatedTMSTileSource ts = new TemplatedTMSTileSource(testImageryTMS); … … 159 159 160 160 @Test 161 publicvoid testGetTileUrl_yahoo() {161 void testGetTileUrl_yahoo() { 162 162 checkGetTileUrl( 163 163 "http://localhost/{z}/{x}/{!y}", … … 169 169 170 170 @Test 171 publicvoid testGetTileUrl_negative_y() {171 void testGetTileUrl_negative_y() { 172 172 checkGetTileUrl( 173 173 "http://localhost/{z}/{x}/{-y}", … … 189 189 */ 190 190 @Test 191 publicvoid testAllUrls() {191 void testAllUrls() { 192 192 for (String[] test: TEST_DATA) { 193 193 TileSourceInfo testImageryTMS = new TileSourceInfo("test imagery", test[0], "id1");
Note:
See TracChangeset
for help on using the changeset viewer.
