Changeset 10950 in josm for trunk


Ignore:
Timestamp:
2016-09-04T01:06:20+02:00 (3 years ago)
Author:
Don-vip
Message:

fix unit test

File:
1 edited

Legend:

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

    r10883 r10950  
    44import static org.junit.Assert.assertEquals;
    55import static org.junit.Assert.assertFalse;
     6import static org.junit.Assert.assertNotEquals;
    67import static org.junit.Assert.assertNotNull;
    78import static org.junit.Assert.assertTrue;
     
    191192    public void testGetMenuEntries() {
    192193        OsmDataLayer layer = new OsmDataLayer(new DataSet(), "", null);
     194        boolean mode = ExpertToggleAction.isExpert();
    193195        ExpertToggleAction.getInstance().actionPerformed(null);
    194         assertEquals(13, layer.getMenuEntries().length);
     196        assertNotEquals(mode, ExpertToggleAction.isExpert());
     197        assertEquals(ExpertToggleAction.isExpert() ? 16 : 13, layer.getMenuEntries().length);
    195198        ExpertToggleAction.getInstance().actionPerformed(null);
    196         assertEquals(16, layer.getMenuEntries().length);
     199        assertEquals(mode, ExpertToggleAction.isExpert());
     200        assertEquals(ExpertToggleAction.isExpert() ? 16 : 13, layer.getMenuEntries().length);
    197201    }
    198202
Note: See TracChangeset for help on using the changeset viewer.