Changeset 19155 in josm for trunk/test/unit/org/openstreetmap/josm/data/osm/DefaultNameFormatterTest.java
- Timestamp:
- 2024-07-29T17:57:38+02:00 (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/osm/DefaultNameFormatterTest.java
r18977 r19155 15 15 import java.util.stream.IntStream; 16 16 17 import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo; 17 18 import org.junit.jupiter.api.Test; 18 19 import org.openstreetmap.josm.TestUtils; … … 25 26 import org.openstreetmap.josm.testutils.annotations.HTTP; 26 27 import org.xml.sax.SAXException; 27 28 import com.github.tomakehurst.wiremock.WireMockServer;29 28 30 29 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; … … 39 38 class DefaultNameFormatterTest { 40 39 /** 41 * HTTP mock.42 */43 @BasicWiremock44 WireMockServer wireMockServer;45 46 /**47 40 * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/9632">#9632</a>. 41 * @param wireMockRuntimeInfo Wiremock information 48 42 * @throws IllegalDataException if an error was found while parsing the data from the source 49 43 * @throws IOException if any I/O error occurs … … 52 46 @Test 53 47 @SuppressFBWarnings(value = "ITA_INEFFICIENT_TO_ARRAY") 54 void testTicket9632() throws IllegalDataException, IOException, SAXException { 48 void testTicket9632(WireMockRuntimeInfo wireMockRuntimeInfo) throws IllegalDataException, IOException, SAXException { 55 49 String source = "presets/Presets_BicycleJunction-preset.xml"; 56 wireMock Server.stubFor(get(urlEqualTo("/" + source))50 wireMockRuntimeInfo.getWireMock().register(get(urlEqualTo("/" + source)) 57 51 .willReturn(aResponse() 58 52 .withStatus(200) 59 53 .withHeader("Content-Type", "text/xml") 60 54 .withBodyFile(source))); 61 TaggingPresets.addTaggingPresets(TaggingPresetReader.readAll(wireMock Server.url(source), true));55 TaggingPresets.addTaggingPresets(TaggingPresetReader.readAll(wireMockRuntimeInfo.getHttpBaseUrl() + '/' + source, true)); 62 56 63 57 Comparator<IRelation<?>> comparator = DefaultNameFormatter.getInstance().getRelationComparator();
Note:
See TracChangeset
for help on using the changeset viewer.