Changeset 10364 in josm for trunk/test
- Timestamp:
- 2016-06-12T20:46:23+02:00 (8 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java
r10340 r10364 124 124 Main.main.createMapFrame(null, null); 125 125 } else { 126 for (Layer l: Main. map.mapView.getAllLayers()) {126 for (Layer l: Main.getLayerManager().getLayers()) { 127 127 Main.map.mapView.removeLayer(l); 128 128 } -
trunk/test/unit/org/openstreetmap/josm/actions/AddImageryLayerActionTest.java
r10188 r10364 47 47 @Test 48 48 public void testActionPerformedEnabled() { 49 assertTrue(Main. map.mapView.getLayersOfType(TMSLayer.class).isEmpty());49 assertTrue(Main.getLayerManager().getLayersOfType(TMSLayer.class).isEmpty()); 50 50 new AddImageryLayerAction(new ImageryInfo("foo_tms", "http://bar", "tms", null, null)).actionPerformed(null); 51 List<TMSLayer> tmsLayers = Main. map.mapView.getLayersOfType(TMSLayer.class);51 List<TMSLayer> tmsLayers = Main.getLayerManager().getLayersOfType(TMSLayer.class); 52 52 assertEquals(1, tmsLayers.size()); 53 53 … … 55 55 new AddImageryLayerAction(new ImageryInfo("wms.openstreetmap.fr", "http://wms.openstreetmap.fr/wms?", 56 56 "wms_endpoint", null, null)).actionPerformed(null); 57 List<WMSLayer> wmsLayers = Main. map.mapView.getLayersOfType(WMSLayer.class);57 List<WMSLayer> wmsLayers = Main.getLayerManager().getLayersOfType(WMSLayer.class); 58 58 assertEquals(1, wmsLayers.size()); 59 59 … … 69 69 @Test 70 70 public void testActionPerformedDisabled() { 71 assertTrue(Main. map.mapView.getLayersOfType(TMSLayer.class).isEmpty());71 assertTrue(Main.getLayerManager().getLayersOfType(TMSLayer.class).isEmpty()); 72 72 new AddImageryLayerAction(new ImageryInfo()).actionPerformed(null); 73 assertTrue(Main. map.mapView.getLayersOfType(TMSLayer.class).isEmpty());73 assertTrue(Main.getLayerManager().getLayersOfType(TMSLayer.class).isEmpty()); 74 74 } 75 75 } -
trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictAddCommandTest.java
r9943 r10364 51 51 @Test 52 52 public void testExecuteUndoCommand() { 53 OsmDataLayer layer = Main. map.mapView.getEditLayer();53 OsmDataLayer layer = Main.getLayerManager().getEditLayer(); 54 54 Conflict<Node> conflict = new Conflict<>(new Node(), new Node()); 55 55 ConflictAddCommand cmd = new ConflictAddCommand(layer, conflict); … … 67 67 @Test 68 68 public void testGetDescriptionIcon() { 69 OsmDataLayer layer = Main. map.mapView.getEditLayer();69 OsmDataLayer layer = Main.getLayerManager().getEditLayer(); 70 70 Conflict<Node> conflict = new Conflict<>(new Node(), new Node()); 71 71 assertNotNull(new ConflictAddCommand(layer, conflict).getDescriptionIcon()); -
trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayerTest.java
r9669 r10364 49 49 gpxLayer).run(); 50 50 assertEquals(2, Main.map.mapView.getNumLayers()); 51 GeoImageLayer layer = Main. map.mapView.getLayersOfType(GeoImageLayer.class).iterator().next();51 GeoImageLayer layer = Main.getLayerManager().getLayersOfType(GeoImageLayer.class).iterator().next(); 52 52 try { 53 53 assertEquals(gpxLayer, layer.getGpxLayer()); -
trunk/test/unit/org/openstreetmap/josm/io/NoteImporterTest.java
r10054 r10364 23 23 public void testTicket12531() { 24 24 if (Main.map != null) { 25 for (Layer l: Main. map.mapView.getAllLayers()) {25 for (Layer l: Main.getLayerManager().getLayers()) { 26 26 Main.map.mapView.removeLayer(l); 27 27 } -
trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandlerTest.java
r9732 r10364 95 95 newHandler("https://localhost?url=" + Utils.encodeUrl(url)).handle(); 96 96 } finally { 97 for (OsmDataLayer layer : Main. map.mapView.getLayersOfType(OsmDataLayer.class)) {97 for (OsmDataLayer layer : Main.getLayerManager().getLayersOfType(OsmDataLayer.class)) { 98 98 Main.main.removeLayer(layer); 99 99 } -
trunk/test/unit/org/openstreetmap/josm/io/session/SessionReaderTest.java
r10218 r10364 139 139 public void testReadNotes() throws IOException, IllegalDataException { 140 140 if (Main.isDisplayingMapView()) { 141 for (NoteLayer nl : Main. map.mapView.getLayersOfType(NoteLayer.class)) {141 for (NoteLayer nl : Main.getLayerManager().getLayersOfType(NoteLayer.class)) { 142 142 Main.map.mapView.removeLayer(nl); 143 143 }
Note:
See TracChangeset
for help on using the changeset viewer.