Changeset 12444 in josm for trunk/test


Ignore:
Timestamp:
2017-07-01T12:51:44+02:00 (7 years ago)
Author:
Don-vip
Message:

refactor WMS test to integration test as it relies on external WMS server

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

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/actions/AddImageryLayerActionTest.java

    r11635 r12444  
    1212import org.openstreetmap.josm.data.imagery.ImageryInfo;
    1313import org.openstreetmap.josm.gui.layer.TMSLayer;
    14 import org.openstreetmap.josm.gui.layer.WMSLayer;
    1514import org.openstreetmap.josm.testutils.JOSMTestRules;
    1615
     
    4342
    4443    /**
    45      * Unit test of {@link AddImageryLayerAction#actionPerformed} - Enabled cases.
     44     * Unit test of {@link AddImageryLayerAction#actionPerformed} - Enabled cases for TMS.
    4645     */
    4746    @Test
     
    5150        List<TMSLayer> tmsLayers = Main.getLayerManager().getLayersOfType(TMSLayer.class);
    5251        assertEquals(1, tmsLayers.size());
    53 
    54         try {
    55             new AddImageryLayerAction(new ImageryInfo("wms.openstreetmap.fr", "http://wms.openstreetmap.fr/wms?",
    56                     "wms_endpoint", null, null)).actionPerformed(null);
    57             List<WMSLayer> wmsLayers = Main.getLayerManager().getLayersOfType(WMSLayer.class);
    58             assertEquals(1, wmsLayers.size());
    59 
    60             Main.getLayerManager().removeLayer(wmsLayers.get(0));
    61         } finally {
    62             Main.getLayerManager().removeLayer(tmsLayers.get(0));
    63         }
     52        Main.getLayerManager().removeLayer(tmsLayers.get(0));
    6453    }
    6554
Note: See TracChangeset for help on using the changeset viewer.