Changeset 10900 in josm for trunk/test/unit


Ignore:
Timestamp:
2016-08-26T08:43:48+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #13453 - Add more Layer#setName tests (patch by michael2402) - gsoc-core

File:
1 edited

Legend:

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

    r10885 r10900  
    9797        testLayer.setName("Test Layer2");
    9898        assertEquals("Test Layer2", testLayer.getName());
     99
     100        testLayer = new LayerManagerTest.TestLayer() {
     101            @Override
     102            public AbstractProperty<Color> getColorProperty() {
     103                return new ColorProperty("test", Color.RED);
     104            }
     105        };
     106
     107        testLayer.setName("Test Layer2");
     108        testLayer.setName(null);
     109        assertEquals("", testLayer.getName());
     110        testLayer.setName("Test Layer3");
     111        assertEquals("Test Layer3", testLayer.getName());
    99112    }
    100113
Note: See TracChangeset for help on using the changeset viewer.