Changeset 17356 in josm for trunk/test
- Timestamp:
- 2020-11-25T10:26:24+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/io/GeoJSONReaderTest.java
r17275 r17356 216 216 } 217 217 218 /** 219 * Tests error reporting for an invalid FeatureCollection 220 * @throws Exception in case of error 221 */ 222 @Test 223 void testInvalidFeatureCollection() throws Exception { 224 String featureCollection = "{\"type\": \"FeatureCollection\", \"features\": {}}"; 225 try (InputStream in = new ByteArrayInputStream(featureCollection.getBytes(StandardCharsets.UTF_8))) { 226 IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, 227 () -> new GeoJSONReader().doParseDataSet(in, null)); 228 assertEquals("features must be ARRAY, but is OBJECT", exception.getMessage()); 229 } 230 } 231 218 232 }
Note:
See TracChangeset
for help on using the changeset viewer.