Changeset 12806 in josm for trunk/test


Ignore:
Timestamp:
2017-09-09T17:48:13+02:00 (4 years ago)
Author:
Don-vip
Message:

see #15229 - see #15182 - remove GUI references from GeoJSONWriter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/io/GeoJSONWriterTest.java

    r12439 r12806  
    1616import org.openstreetmap.josm.data.osm.Node;
    1717import org.openstreetmap.josm.data.osm.Way;
    18 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    1918
    2019/**
     
    4140        final DataSet ds = new DataSet();
    4241        ds.addPrimitive(node);
    43         final OsmDataLayer layer = new OsmDataLayer(ds, "foo", null);
    44         final GeoJSONWriter writer = new GeoJSONWriter(layer);
     42        final GeoJSONWriter writer = new GeoJSONWriter(ds);
    4543        assertEquals(("" +
    4644                "{\n" +
     
    8078        way.setNodes(Arrays.asList(n1, n2));
    8179        ds.addPrimitive(way);
    82         final OsmDataLayer layer = new OsmDataLayer(ds, "foo", null);
    83         final GeoJSONWriter writer = new GeoJSONWriter(layer);
     80        final GeoJSONWriter writer = new GeoJSONWriter(ds);
    8481        assertEquals(("" +
    8582                "{\n" +
     
    118115        try (FileInputStream in = new FileInputStream(TestUtils.getTestDataRoot() + "multipolygon.osm")) {
    119116            DataSet ds = OsmReader.parseDataSet(in, null);
    120             final OsmDataLayer layer = new OsmDataLayer(ds, "foo", null);
    121             final GeoJSONWriter writer = new GeoJSONWriter(layer);
     117            final GeoJSONWriter writer = new GeoJSONWriter(ds);
    122118            assertTrue(writer.write().contains("MultiPolygon"));
    123119        }
     
    132128        try (FileInputStream in = new FileInputStream("data_nodist/multipolygon.osm")) {
    133129            DataSet ds = OsmReader.parseDataSet(in, null);
    134             final OsmDataLayer layer = new OsmDataLayer(ds, "foo", null);
    135             final GeoJSONWriter writer = new GeoJSONWriter(layer);
     130            final GeoJSONWriter writer = new GeoJSONWriter(ds);
    136131            assertTrue(writer.write().contains("MultiPolygon"));
    137132        }
Note: See TracChangeset for help on using the changeset viewer.