Changeset 18046 in josm for trunk/test
- Timestamp:
- 2021-07-17T14:42:03+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/tools/MediawikiTest.java
r17275 r18046 4 4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 5 6 import java.net.URI; 7 import java.net.URL; 8 6 9 import org.junit.jupiter.api.Test; 10 import org.openstreetmap.josm.data.Bounds; 7 11 8 12 /** … … 21 25 Mediawiki.getImageUrl("https://upload.wikimedia.org/wikipedia/commons/", "OpenJDK_logo.svg")); 22 26 } 27 28 /** 29 * Test of {@link Mediawiki#getGeoImagesUrl} 30 * @throws Exception never 31 */ 32 @Test 33 void testGeoImagesUrl() throws Exception { 34 // See https://josm.openstreetmap.de/ticket/21126 35 // Checks that URL can be converted to URI, needed for HTTP/2 36 assertEquals(new URI("https://commons.wikimedia.org/w/api.php?format=xml&action=query&list=geosearch&gsnamespace=6&gslimit=500&gsprop=type%7Cname&gsbbox=48.8623665%7C2.3913497%7C48.8600879%7C2.3967605"), 37 new URL(Mediawiki.getGeoImagesUrl("https://commons.wikimedia.org/w/api.php", new Bounds(48.8600879, 2.3913497, 48.8623665, 2.3967605))).toURI()); 38 } 23 39 }
Note:
See TracChangeset
for help on using the changeset viewer.