Changeset 10332 in josm for trunk/test


Ignore:
Timestamp:
2016-06-07T08:22:39+02:00 (8 years ago)
Author:
stoecker
Message:

Do not use deprecated EditLayerChangedListener - patch my Michael Zangl - gsoc-core - fix #12924

File:
1 edited

Legend:

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

    r10279 r10332  
    110110    }
    111111
     112    /**
     113     * Test {@link MainLayerManager#addActiveLayerChangeListener(ActiveLayerChangeListener)} and
     114     * {@link MainLayerManager#addAndFireActiveLayerChangeListener(ActiveLayerChangeListener)}
     115     */
    112116    @Test
    113117    public void testAddActiveLayerChangeListener() {
     
    118122
    119123        CapturingActiveLayerChangeListener listener = new CapturingThreadCheckingActiveLayerChangeListener();
    120         layerManagerWithActive.addActiveLayerChangeListener(listener, false);
     124        layerManagerWithActive.addActiveLayerChangeListener(listener);
    121125        assertNull(listener.lastEvent);
    122126
    123127        CapturingActiveLayerChangeListener listener2 = new CapturingActiveLayerChangeListener();
    124         layerManagerWithActive.addActiveLayerChangeListener(listener2, true);
     128        layerManagerWithActive.addAndFireActiveLayerChangeListener(listener2);
    125129        assertSame(listener2.lastEvent.getPreviousActiveLayer(), null);
    126130        assertSame(listener2.lastEvent.getPreviousEditLayer(), null);
     
    141145    public void testAddActiveLayerChangeListenerTwice() {
    142146        CapturingActiveLayerChangeListener listener = new CapturingActiveLayerChangeListener();
    143         layerManagerWithActive.addActiveLayerChangeListener(listener, false);
    144         layerManagerWithActive.addActiveLayerChangeListener(listener, false);
     147        layerManagerWithActive.addActiveLayerChangeListener(listener);
     148        layerManagerWithActive.addActiveLayerChangeListener(listener);
    145149    }
    146150
     
    156160
    157161        CapturingActiveLayerChangeListener listener = new CapturingActiveLayerChangeListener();
    158         layerManagerWithActive.addActiveLayerChangeListener(listener, false);
     162        layerManagerWithActive.addActiveLayerChangeListener(listener);
    159163        layerManagerWithActive.removeActiveLayerChangeListener(listener);
    160164
Note: See TracChangeset for help on using the changeset viewer.