Changeset 10171 in josm for trunk/test
- Timestamp:
- 2016-05-10T01:31:36+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/io/GeoJSONWriterTest.java
r10165 r10171 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.io; 3 4 import static org.junit.Assert.assertEquals; 3 5 4 6 import org.junit.BeforeClass; … … 11 13 import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference; 12 14 13 import static org.hamcrest.CoreMatchers.*; 14 import static org.junit.Assert.*; 15 15 /** 16 * Unit tests of {@link GeoJSONWriter} class. 17 */ 16 18 public class GeoJSONWriterTest { 17 19 … … 24 26 } 25 27 28 /** 29 * Unit test 30 */ 26 31 @Test 27 public void testPoint() throws Exception{32 public void testPoint() { 28 33 final Node node = new Node(new LatLon(12.3, 4.56)); 29 34 node.put("name", "foo"); … … 33 38 final OsmDataLayer layer = new OsmDataLayer(ds, "foo", null); 34 39 final GeoJSONWriter writer = new GeoJSONWriter(layer, ProjectionPreference.wgs84.getProjection()); 35 assert That(writer.write().trim(), is(("" +40 assertEquals(("" + 36 41 "{\n" + 37 42 " 'type':'FeatureCollection',\n" + … … 59 64 " }\n" + 60 65 " ]\n" + 61 "}").replace("'", "\"") ));66 "}").replace("'", "\""), writer.write().trim()); 62 67 } 63 68 }
Note:
See TracChangeset
for help on using the changeset viewer.