Changeset 10824 in josm for trunk/test


Ignore:
Timestamp:
2016-08-17T09:18:31+02:00 (8 years ago)
Author:
Don-vip
Message:

see #13309 - Caching and notifying preferences (patch by michael2402) - gsoc-core

Location:
trunk/test/unit/org/openstreetmap/josm
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/GpxLayerTest.java

    r10467 r10824  
    7474        assertEquals("foo", layer.getName());
    7575        assertFalse(layer.isLocalFile());
    76         assertEquals(Color.MAGENTA, layer.getColor(false));
     76        assertEquals(Color.MAGENTA, layer.getColorProperty().get());
    7777        assertEquals("<html>0 tracks, 0 routes, 0 waypoints<br>Length: < 0.01 m<br></html>", layer.getToolTipText());
    7878
     
    8080        assertEquals("bar", layer2.getName());
    8181        assertTrue(layer2.isLocalFile());
    82         assertEquals(Color.MAGENTA, layer2.getColor(true));
     82        assertEquals(Color.MAGENTA, layer2.getColorProperty().get());
    8383        assertEquals("<html>0 tracks, 0 routes, 0 waypoints<br>Length: < 0.01 m<br></html>", layer2.getToolTipText());
    8484
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelperTest.java

    r9809 r10824  
    44import static org.junit.Assert.assertEquals;
    55
     6import java.awt.Color;
    67import java.io.FileNotFoundException;
    78import java.io.IOException;
     
    1718import org.openstreetmap.josm.data.gpx.GpxData;
    1819import org.openstreetmap.josm.data.gpx.WayPoint;
     20import org.openstreetmap.josm.data.preferences.ColorProperty;
    1921import org.openstreetmap.josm.io.GpxReaderTest;
    2022import org.openstreetmap.josm.tools.ColorHelper;
     
    125127    static List<String> calculateColors(String fileName, String layerName, int n) throws IOException, SAXException {
    126128        final GpxData data = GpxReaderTest.parseGpxData(fileName);
    127         final GpxDrawHelper gdh = new GpxDrawHelper(data);
     129        final GpxDrawHelper gdh = new GpxDrawHelper(data, new ColorProperty("x", Color.MAGENTA));
    128130        gdh.readPreferences(layerName);
    129131        gdh.calculateColors();
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayerTest.java

    r10378 r10824  
    4242
    4343        assertEquals("foo", layer.getName());
    44         assertEquals(Color.magenta, layer.getColor(false));
     44        assertEquals(Color.magenta, layer.getColorProperty().get());
    4545        assertNotNull(layer.getIcon());
    4646        assertEquals("0 markers", layer.getToolTipText());
     
    5959
    6060        assertEquals("bar", layer.getName());
    61         assertEquals(Color.magenta, layer.getColor(false));
     61        assertEquals(Color.magenta, layer.getColorProperty().get());
    6262        assertNotNull(layer.getIcon());
    6363        assertEquals("3 markers", layer.getToolTipText());
Note: See TracChangeset for help on using the changeset viewer.