Changeset 18050 in josm
- Timestamp:
- 2021-07-17T17:16:14+02:00 (4 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/resources/data/validator/combinations.mapcss
r18047 r18050 931 931 group: tr("missing tag"); 932 932 set missing_piste_difficulty; 933 assertMatch: "way piste:type=nordic (count(parent_tag("piste:difficulty")) == 0)";934 assertNoMatch: "way piste:type=nordic (count(parent_tag("piste:difficulty")) == 1)";935 933 assertNoMatch: "way piste:type=nordic piste:difficulty=easy"; 936 934 } … … 940 938 group: tr("missing tag"); 941 939 set missing_piste_difficulty_both; 942 assertMatch: "way piste:type=nordic (count(parent_tag("piste:difficulty")) == 0)";943 assertNoMatch: "way piste:type=nordic (count(parent_tag("piste:difficulty")) == 1)";944 940 assertNoMatch: "way piste:type=nordic piste:difficulty=easy"; 945 941 } -
trunk/src/org/openstreetmap/josm/data/ImageData.java
r18049 r18050 317 317 * @param img the {@link ImageEntry} to remove 318 318 * @param fireUpdateEvent if {@code true}, notifies listeners of image update 319 * @since xxx319 * @since 18049 320 320 */ 321 321 public void removeImage(ImageEntry img, boolean fireUpdateEvent) { -
trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java
r15951 r18050 169 169 : null; 170 170 if (p == null) { 171 throw new IllegalArgumentException("Expecting n/node/w/way/r/relation/area, but got '" + x[0] + '\''); 171 throw new IllegalArgumentException( 172 "Expecting n/node/w/way/r/relation/area, but got '" + x[0] + "' for assertion '" + assertion + '\''); 172 173 } 173 174 if (x.length > 1) { -
trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/WikimediaCommonsLoaderTest.java
r18037 r18050 11 11 import java.util.List; 12 12 13 import org.junit.jupiter.api.BeforeAll; 14 import org.junit.jupiter.api.Test; 13 15 import org.openstreetmap.josm.data.Bounds; 14 16 import org.openstreetmap.josm.testutils.annotations.BasicPreferences; 17 import org.openstreetmap.josm.tools.Http1Client; 18 import org.openstreetmap.josm.tools.HttpClient; 15 19 16 20 import com.github.tomakehurst.wiremock.WireMockServer; 17 import org.junit.jupiter.api.Test;18 21 19 22 /** … … 22 25 @BasicPreferences 23 26 class WikimediaCommonsLoaderTest { 27 28 @BeforeAll 29 static void beforeAll() { 30 HttpClient.setFactory(Http1Client::new); 31 } 32 24 33 /** 25 34 * Unit test of {@link WikimediaCommonsLoader} … … 45 54 } 46 55 47 private WireMockServer mockHttp() { 48 String xml = "" +56 private static WireMockServer mockHttp() { 57 String xml = 49 58 "<api batchcomplete=\"\">\n" + 50 59 "<query>\n" + … … 57 66 final WireMockServer wireMock = new WireMockServer(options().dynamicPort()); 58 67 wireMock.stubFor(get(urlEqualTo("/w/api.php?format=xml&action=query&list=geosearch" + 59 "&gsnamespace=6&gslimit=500&gsprop=type |name&gsbbox=48.0|11.0|47.0|12.0"))68 "&gsnamespace=6&gslimit=500&gsprop=type%7Cname&gsbbox=48.0%7C11.0%7C47.0%7C12.0")) 60 69 .willReturn(aResponse().withBody(xml))); 61 70 return wireMock; -
trunk/test/unit/org/openstreetmap/josm/tools/MediawikiTest.java
r18046 r18050 34 34 // See https://josm.openstreetmap.de/ticket/21126 35 35 // Checks that URL can be converted to URI, needed for HTTP/2 36 // CHECKSTYLE.OFF: LineLength 36 37 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 new URL(Mediawiki.getGeoImagesUrl("https://commons.wikimedia.org/w/api.php", 39 new Bounds(48.8600879, 2.3913497, 48.8623665, 2.3967605))).toURI()); 40 // CHECKSTYLE.ON: LineLength 38 41 } 39 42 }
Note:
See TracChangeset
for help on using the changeset viewer.