Changeset 10571 in josm for trunk/test/unit


Ignore:
Timestamp:
2016-07-20T19:34:37+02:00 (5 years ago)
Author:
Don-vip
Message:

fix #13172 - Move ImageryLayer.d[xy] to the settings (patch by michael2402) - gsoc-core

Location:
trunk/test/unit/org/openstreetmap/josm/io/session
Files:
2 edited

Legend:

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

    r10396 r10571  
    1515import org.openstreetmap.josm.Main;
    1616import org.openstreetmap.josm.TestUtils;
     17import org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer;
    1718import org.openstreetmap.josm.gui.layer.GpxLayer;
    1819import org.openstreetmap.josm.gui.layer.ImageryLayer;
     
    125126        assertEquals(layers.size(), 1);
    126127        assertTrue(layers.get(0) instanceof ImageryLayer);
    127         final ImageryLayer image = (ImageryLayer) layers.get(0);
     128        final AbstractTileSourceLayer<?> image = (AbstractTileSourceLayer<?>) layers.get(0);
    128129        assertEquals("Bing aerial imagery", image.getName());
    129         assertEquals(image.getDx(), 12.34, 1e-9);
    130         assertEquals(image.getDy(), -56.78, 1e-9);
     130        assertEquals(image.getDisplaySettings().getDx(), 12.34, 1e-9);
     131        assertEquals(image.getDisplaySettings().getDy(), -56.78, 1e-9);
    131132    }
    132133
  • trunk/test/unit/org/openstreetmap/josm/io/session/SessionWriterTest.java

    r9753 r10571  
    1515import org.junit.Test;
    1616import org.openstreetmap.josm.JOSMFixture;
     17import org.openstreetmap.josm.data.coor.EastNorth;
    1718import org.openstreetmap.josm.data.coor.LatLon;
    1819import org.openstreetmap.josm.data.gpx.GpxData;
     
    136137
    137138    private ImageryLayer createImageryLayer() {
    138         ImageryLayer layer = new TMSLayer(new ImageryInfo("the name", "http://www.url.com/"));
    139         layer.setOffset(12, 34);
     139        TMSLayer layer = new TMSLayer(new ImageryInfo("the name", "http://www.url.com/"));
     140        layer.getDisplaySettings().setDisplacement(new EastNorth(12, 34));
    140141        return layer;
    141142    }
Note: See TracChangeset for help on using the changeset viewer.