Changeset 17961 in josm for trunk/test/unit


Ignore:
Timestamp:
2021-07-08T20:33:28+02:00 (3 years ago)
Author:
Don-vip
Message:

see #17177 - fix unit test on Windows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/imagery/vectortile/mapbox/style/MapboxVectorStyleTest.java

    r17960 r17961  
    99import static org.junit.jupiter.api.Assertions.assertTrue;
    1010import static org.junit.jupiter.api.Assertions.fail;
    11 
    1211
    1312import java.awt.Color;
     
    1918import java.io.IOException;
    2019import java.nio.charset.StandardCharsets;
    21 import java.nio.file.Paths;
    2220import java.text.MessageFormat;
    2321import java.util.ArrayList;
     
    3735import javax.json.JsonValue;
    3836
     37import org.awaitility.Awaitility;
     38import org.awaitility.Durations;
     39import org.junit.jupiter.api.Test;
     40import org.junit.jupiter.api.extension.RegisterExtension;
     41import org.junit.jupiter.api.io.TempDir;
    3942import org.openstreetmap.josm.TestUtils;
    4043import org.openstreetmap.josm.gui.MainApplication;
     
    5053
    5154import nl.jqno.equalsverifier.EqualsVerifier;
    52 import org.awaitility.Awaitility;
    53 import org.awaitility.Durations;
    54 import org.junit.jupiter.api.Test;
    55 import org.junit.jupiter.api.extension.RegisterExtension;
    56 import org.junit.jupiter.api.io.TempDir;
    5755
    5856/**
     
    162160        ImageProvider.clearCache();
    163161        int hiDpiScalar = hiDpi ? 2 : 1;
    164         String spritePath = this.spritesDirectory + "/sprite";
     162        String spritePath = this.spritesDirectory.toURI() + "sprite";
    165163        MapboxVectorStyle style = new MapboxVectorStyle(getJson(JsonObject.class,
    166           MessageFormat.format(BASE_STYLE, "sprite_test", "\"sprite\":\"file:/" + spritePath + "\"")));
    167         assertEquals("file:/" + spritePath, style.getSpriteUrl());
     164          MessageFormat.format(BASE_STYLE, "sprite_test", "\"sprite\":\"" + spritePath + "\"")));
     165        assertEquals(spritePath, style.getSpriteUrl());
    168166
    169167        AtomicBoolean saveFinished = new AtomicBoolean();
Note: See TracChangeset for help on using the changeset viewer.