Changeset 10817 in josm for trunk/test/unit
- Timestamp:
- 2016-08-15T21:30:34+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/io/GeoJSONWriterTest.java
r10171 r10817 3 3 4 4 import static org.junit.Assert.assertEquals; 5 import static org.junit.Assert.assertTrue; 5 6 6 7 import org.junit.BeforeClass; 7 8 import org.junit.Test; 8 9 import org.openstreetmap.josm.JOSMFixture; 10 import org.openstreetmap.josm.TestUtils; 9 11 import org.openstreetmap.josm.data.coor.LatLon; 10 12 import org.openstreetmap.josm.data.osm.DataSet; … … 12 14 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 13 15 import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference; 16 17 import java.io.FileInputStream; 14 18 15 19 /** … … 66 70 "}").replace("'", "\""), writer.write().trim()); 67 71 } 72 73 /** 74 * Unit test for multipolygon 75 */ 76 @Test 77 public void testMultipolygon() throws Exception { 78 try (FileInputStream in = new FileInputStream(TestUtils.getTestDataRoot() + "multipolygon.osm")) { 79 DataSet ds = OsmReader.parseDataSet(in, null); 80 final OsmDataLayer layer = new OsmDataLayer(ds, "foo", null); 81 final GeoJSONWriter writer = new GeoJSONWriter(layer, ProjectionPreference.wgs84.getProjection()); 82 assertTrue(writer.write().contains("MultiPolygon")); 83 } 84 } 68 85 }
Note:
See TracChangeset
for help on using the changeset viewer.