Changeset 12023 in josm


Ignore:
Timestamp:
2017-04-29T22:02:31+02:00 (23 months ago)
Author:
michael2402
Message:

See #14120: Do not overwrite the mapView field for unit tests. Fix map view scale/center.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/actions/mapmode/DrawActionTest.java

    r10945 r12023  
    2222import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2323import org.openstreetmap.josm.data.osm.Way;
    24 import org.openstreetmap.josm.gui.MapFrame;
    2524import org.openstreetmap.josm.gui.OsmPrimitivRenderer;
    2625import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    2726import org.openstreetmap.josm.testutils.JOSMTestRules;
    28 import org.openstreetmap.josm.tools.Utils;
    2927
    3028import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
     
    5654        Main.getLayerManager().addLayer(layer);
    5755
    58         Field mapView = MapFrame.class.getDeclaredField("mapView");
    59         Utils.setObjectsAccessible(mapView);
    60         mapView.set(Main.map, new MapViewMock());
     56        // fix map view position
     57        Main.map.mapView.zoomTo(new EastNorth(0, 0), 1);
    6158
    6259        Node n1 = new Node(new EastNorth(0, 0));
Note: See TracChangeset for help on using the changeset viewer.