Ignore:
Timestamp:
2024-07-29T17:57:38+02:00 (9 months ago)
Author:
taylor.smock
Message:

Fix tests broken by r19152

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/osm/DefaultNameFormatterTest.java

    r18977 r19155  
    1515import java.util.stream.IntStream;
    1616
     17import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo;
    1718import org.junit.jupiter.api.Test;
    1819import org.openstreetmap.josm.TestUtils;
     
    2526import org.openstreetmap.josm.testutils.annotations.HTTP;
    2627import org.xml.sax.SAXException;
    27 
    28 import com.github.tomakehurst.wiremock.WireMockServer;
    2928
    3029import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
     
    3938class DefaultNameFormatterTest {
    4039    /**
    41      * HTTP mock.
    42      */
    43     @BasicWiremock
    44     WireMockServer wireMockServer;
    45 
    46     /**
    4740     * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/9632">#9632</a>.
     41     * @param wireMockRuntimeInfo Wiremock information
    4842     * @throws IllegalDataException if an error was found while parsing the data from the source
    4943     * @throws IOException if any I/O error occurs
     
    5246    @Test
    5347    @SuppressFBWarnings(value = "ITA_INEFFICIENT_TO_ARRAY")
    54     void testTicket9632() throws IllegalDataException, IOException, SAXException {
     48    void testTicket9632(WireMockRuntimeInfo wireMockRuntimeInfo) throws IllegalDataException, IOException, SAXException {
    5549        String source = "presets/Presets_BicycleJunction-preset.xml";
    56         wireMockServer.stubFor(get(urlEqualTo("/" + source))
     50        wireMockRuntimeInfo.getWireMock().register(get(urlEqualTo("/" + source))
    5751                .willReturn(aResponse()
    5852                    .withStatus(200)
    5953                    .withHeader("Content-Type", "text/xml")
    6054                    .withBodyFile(source)));
    61         TaggingPresets.addTaggingPresets(TaggingPresetReader.readAll(wireMockServer.url(source), true));
     55        TaggingPresets.addTaggingPresets(TaggingPresetReader.readAll(wireMockRuntimeInfo.getHttpBaseUrl() + '/' + source, true));
    6256
    6357        Comparator<IRelation<?>> comparator = DefaultNameFormatter.getInstance().getRelationComparator();
Note: See TracChangeset for help on using the changeset viewer.