Changeset 10436 in josm for trunk/test/unit/org
- Timestamp:
- 2016-06-20T02:47:43+02:00 (8 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/actions/AlignInLineActionTest.java
r10347 r10436 59 59 60 60 try { 61 Main. main.addLayer(layer);61 Main.getLayerManager().addLayer(layer); 62 62 63 63 // Create an open way. … … 70 70 } finally { 71 71 // Ensure we clean the place before leaving, even if test fails. 72 Main. main.removeLayer(layer);72 Main.getLayerManager().removeLayer(layer); 73 73 } 74 74 … … 99 99 100 100 try { 101 Main. main.addLayer(layer);101 Main.getLayerManager().addLayer(layer); 102 102 103 103 // Create a closed way. … … 109 109 } finally { 110 110 // Ensure we clean the place before leaving, even if test fails. 111 Main. main.removeLayer(layer);111 Main.getLayerManager().removeLayer(layer); 112 112 } 113 113 … … 139 139 140 140 try { 141 Main. main.addLayer(layer);141 Main.getLayerManager().addLayer(layer); 142 142 143 143 // Create 2 ways. … … 152 152 } finally { 153 153 // Ensure we clean the place before leaving, even if test fails. 154 Main. main.removeLayer(layer);154 Main.getLayerManager().removeLayer(layer); 155 155 } 156 156 -
trunk/test/unit/org/openstreetmap/josm/actions/CreateCircleActionTest.java
r10225 r10436 94 94 action.setEnabled(true); 95 95 try { 96 Main. main.addLayer(layer);96 Main.getLayerManager().addLayer(layer); 97 97 action.actionPerformed(null); 98 98 } finally { 99 99 // Ensure we clean the place before leaving, even if test fails. 100 Main. main.removeLayer(layer);100 Main.getLayerManager().removeLayer(layer); 101 101 } 102 102 … … 170 170 action.setEnabled(true); 171 171 try { 172 Main. main.addLayer(layer);172 Main.getLayerManager().addLayer(layer); 173 173 action.actionPerformed(null); 174 174 } finally { 175 175 // Ensure we clean the place before leaving, even if test fails. 176 Main. main.removeLayer(layer);176 Main.getLayerManager().removeLayer(layer); 177 177 } 178 178 -
trunk/test/unit/org/openstreetmap/josm/actions/JoinAreasActionTest.java
r9663 r10436 42 42 DataSet ds = OsmReader.parseDataSet(is, null); 43 43 Layer layer = new OsmDataLayer(ds, null, null); 44 Main. main.addLayer(layer);44 Main.getLayerManager().addLayer(layer); 45 45 // FIXME enable this test after we fix the bug. Test disabled for now 46 46 // try { … … 48 48 // } finally { 49 49 // Ensure we clean the place before leaving, even if test fails. 50 Main. main.removeLayer(layer);50 Main.getLayerManager().removeLayer(layer); 51 51 // } 52 52 } … … 64 64 assertEquals(10, ds.getWays().size()); 65 65 Layer layer = new OsmDataLayer(ds, null, null); 66 Main. main.addLayer(layer);66 Main.getLayerManager().addLayer(layer); 67 67 try { 68 68 for (String ref : new String[]{"A", "B", "C", "D", "E"}) { … … 76 76 } finally { 77 77 // Ensure we clean the place before leaving, even if test fails. 78 Main. main.removeLayer(layer);78 Main.getLayerManager().removeLayer(layer); 79 79 } 80 80 } -
trunk/test/unit/org/openstreetmap/josm/actions/PurgeActionTest.java
r9671 r10436 44 44 DataSet ds = OsmReader.parseDataSet(is, null); 45 45 OsmDataLayer layer = new OsmDataLayer(ds, null, null); 46 Main. main.addLayer(layer);46 Main.getLayerManager().addLayer(layer); 47 47 try { 48 48 for (Way w : ds.getWays()) { … … 60 60 } finally { 61 61 // Ensure we clean the place before leaving, even if test fails. 62 Main. main.removeLayer(layer);62 Main.getLayerManager().removeLayer(layer); 63 63 } 64 64 } -
trunk/test/unit/org/openstreetmap/josm/actions/SelectByInternalPointActionTest.java
r10413 r10436 39 39 public void testNoDataSet() { 40 40 while (Main.main.hasEditLayer()) { 41 Main. main.removeLayer(Main.getLayerManager().getEditLayer());41 Main.getLayerManager().removeLayer(Main.getLayerManager().getEditLayer()); 42 42 } 43 43 assertNull(JosmAction.getCurrentDataSet()); … … 69 69 ds.addPrimitive(r); 70 70 OsmDataLayer layer = new OsmDataLayer(ds, "", null); 71 Main. main.addLayer(layer);71 Main.getLayerManager().addLayer(layer); 72 72 return layer; 73 73 } … … 86 86 } finally { 87 87 // Ensure we clean the place before leaving, even if test fails. 88 Main. main.removeLayer(layer);88 Main.getLayerManager().removeLayer(layer); 89 89 } 90 90 } … … 101 101 } finally { 102 102 // Ensure we clean the place before leaving, even if test fails. 103 Main. main.removeLayer(layer);103 Main.getLayerManager().removeLayer(layer); 104 104 } 105 105 } … … 130 130 } finally { 131 131 // Ensure we clean the place before leaving, even if test fails. 132 Main. main.removeLayer(layer);132 Main.getLayerManager().removeLayer(layer); 133 133 } 134 134 } -
trunk/test/unit/org/openstreetmap/josm/actions/SimplifyWayActionTest.java
r10263 r10436 54 54 OsmDataLayer layer = new OsmDataLayer(ds, "", null); 55 55 try { 56 Main. main.addLayer(layer);56 Main.getLayerManager().addLayer(layer); 57 57 assertTrue(ds.getSelected().isEmpty()); 58 58 action.actionPerformed(null); 59 59 } finally { 60 Main. main.removeLayer(layer);60 Main.getLayerManager().removeLayer(layer); 61 61 } 62 62 } … … 71 71 OsmDataLayer layer = new OsmDataLayer(ds, "", null); 72 72 try { 73 Main. main.addLayer(layer);73 Main.getLayerManager().addLayer(layer); 74 74 assertEquals(1, ds.getSelected().size()); 75 75 action.actionPerformed(null); 76 76 } finally { 77 Main. main.removeLayer(layer);77 Main.getLayerManager().removeLayer(layer); 78 78 } 79 79 } … … 90 90 OsmDataLayer layer = new OsmDataLayer(ds, "", null); 91 91 try { 92 Main. main.addLayer(layer);92 Main.getLayerManager().addLayer(layer); 93 93 assertEquals(11, ds.getSelected().size()); 94 94 action.actionPerformed(null); 95 95 } finally { 96 Main. main.removeLayer(layer);96 Main.getLayerManager().removeLayer(layer); 97 97 } 98 98 } -
trunk/test/unit/org/openstreetmap/josm/actions/SplitWayActionTest.java
r10256 r10436 79 79 80 80 try { 81 Main. main.addLayer(layer);81 Main.getLayerManager().addLayer(layer); 82 82 action.actionPerformed(null); 83 83 } finally { 84 84 // Ensure we clean the place before leaving, even if test fails. 85 Main. main.removeLayer(layer);85 Main.getLayerManager().removeLayer(layer); 86 86 } 87 87 -
trunk/test/unit/org/openstreetmap/josm/actions/UnGlueActionTest.java
r10256 r10436 41 41 OsmDataLayer layer = new OsmDataLayer(ds, "", null); 42 42 try { 43 Main. main.addLayer(layer);43 Main.getLayerManager().addLayer(layer); 44 44 assertTrue(ds.getSelected().isEmpty()); 45 45 assertTrue(ds.allPrimitives().isEmpty()); … … 47 47 assertTrue(ds.allPrimitives().isEmpty()); 48 48 } finally { 49 Main. main.removeLayer(layer);49 Main.getLayerManager().removeLayer(layer); 50 50 } 51 51 } … … 62 62 ds.setSelected(n); 63 63 try { 64 Main. main.addLayer(layer);64 Main.getLayerManager().addLayer(layer); 65 65 assertEquals(1, ds.getSelected().size()); 66 66 assertEquals(1, ds.allPrimitives().size()); … … 68 68 assertEquals(1, ds.allPrimitives().size()); 69 69 } finally { 70 Main. main.removeLayer(layer);70 Main.getLayerManager().removeLayer(layer); 71 71 } 72 72 } … … 89 89 ds.setSelected(n1); 90 90 try { 91 Main. main.addLayer(layer);91 Main.getLayerManager().addLayer(layer); 92 92 assertEquals(1, ds.getSelected().size()); 93 93 assertEquals(3, ds.allPrimitives().size()); … … 95 95 assertEquals(3, ds.allPrimitives().size()); 96 96 } finally { 97 Main. main.removeLayer(layer);97 Main.getLayerManager().removeLayer(layer); 98 98 } 99 99 } … … 122 122 ds.setSelected(n1); 123 123 try { 124 Main. main.addLayer(layer);124 Main.getLayerManager().addLayer(layer); 125 125 assertEquals(1, ds.getSelected().size()); 126 126 assertEquals(5, ds.allPrimitives().size()); … … 128 128 assertEquals(6, ds.allPrimitives().size()); 129 129 } finally { 130 Main. main.removeLayer(layer);130 Main.getLayerManager().removeLayer(layer); 131 131 } 132 132 } -
trunk/test/unit/org/openstreetmap/josm/actions/UnJoinNodeWayActionTest.java
r10222 r10436 74 74 action.setEnabled(true); 75 75 try { 76 Main. main.addLayer(layer);76 Main.getLayerManager().addLayer(layer); 77 77 action.actionPerformed(null); 78 78 } finally { 79 79 // Ensure we clean the place before leaving, even if test fails. 80 Main. main.removeLayer(layer);80 Main.getLayerManager().removeLayer(layer); 81 81 } 82 82 -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/AddNoteActionTest.java
r9944 r10436 36 36 OsmDataLayer layer = new OsmDataLayer(new DataSet(), "", null); 37 37 try { 38 Main. main.addLayer(layer);38 Main.getLayerManager().addLayer(layer); 39 39 AddNoteAction mapMode = new AddNoteAction(Main.map, new NoteData(Collections.<Note>emptyList())); 40 40 MapMode oldMapMode = Main.map.mapMode; … … 43 43 assertTrue(Main.map.selectMapMode(oldMapMode)); 44 44 } finally { 45 Main. main.removeLayer(layer);45 Main.getLayerManager().removeLayer(layer); 46 46 } 47 47 } -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/DeleteActionTest.java
r9944 r10436 32 32 OsmDataLayer layer = new OsmDataLayer(new DataSet(), "", null); 33 33 try { 34 Main. main.addLayer(layer);34 Main.getLayerManager().addLayer(layer); 35 35 DeleteAction mapMode = new DeleteAction(Main.map); 36 36 MapMode oldMapMode = Main.map.mapMode; … … 39 39 assertTrue(Main.map.selectMapMode(oldMapMode)); 40 40 } finally { 41 Main. main.removeLayer(layer);41 Main.getLayerManager().removeLayer(layer); 42 42 } 43 43 } -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/DrawActionTest.java
r10396 r10436 68 68 dataSet.addPrimitive(w); 69 69 70 Main. main.addLayer(layer);70 Main.getLayerManager().addLayer(layer); 71 71 try { 72 72 assertTrue(Main.map.selectDrawTool(false)); … … 99 99 } finally { 100 100 // Ensure we clean the place before leaving, even if test fails. 101 Main. main.removeLayer(layer);101 Main.getLayerManager().removeLayer(layer); 102 102 } 103 103 } -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ExtrudeActionTest.java
r9944 r10436 32 32 OsmDataLayer layer = new OsmDataLayer(new DataSet(), "", null); 33 33 try { 34 Main. main.addLayer(layer);34 Main.getLayerManager().addLayer(layer); 35 35 ExtrudeAction mapMode = new ExtrudeAction(Main.map); 36 36 MapMode oldMapMode = Main.map.mapMode; … … 39 39 assertTrue(Main.map.selectMapMode(oldMapMode)); 40 40 } finally { 41 Main. main.removeLayer(layer);41 Main.getLayerManager().removeLayer(layer); 42 42 } 43 43 } -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyActionTest.java
r9944 r10436 32 32 OsmDataLayer layer = new OsmDataLayer(new DataSet(), "", null); 33 33 try { 34 Main. main.addLayer(layer);34 Main.getLayerManager().addLayer(layer); 35 35 ImproveWayAccuracyAction mapMode = new ImproveWayAccuracyAction(Main.map); 36 36 MapMode oldMapMode = Main.map.mapMode; … … 39 39 assertTrue(Main.map.selectMapMode(oldMapMode)); 40 40 } finally { 41 Main. main.removeLayer(layer);41 Main.getLayerManager().removeLayer(layer); 42 42 } 43 43 } -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ParallelWayActionTest.java
r9944 r10436 32 32 OsmDataLayer layer = new OsmDataLayer(new DataSet(), "", null); 33 33 try { 34 Main. main.addLayer(layer);34 Main.getLayerManager().addLayer(layer); 35 35 ParallelWayAction mapMode = new ParallelWayAction(Main.map); 36 36 MapMode oldMapMode = Main.map.mapMode; … … 39 39 assertTrue(Main.map.selectMapMode(oldMapMode)); 40 40 } finally { 41 Main. main.removeLayer(layer);41 Main.getLayerManager().removeLayer(layer); 42 42 } 43 43 } -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/PlayHeadDragModeTest.java
r9944 r10436 33 33 OsmDataLayer layer = new OsmDataLayer(new DataSet(), "", null); 34 34 try { 35 Main. main.addLayer(layer);35 Main.getLayerManager().addLayer(layer); 36 36 PlayHeadDragMode mapMode = new PlayHeadDragMode(PlayHeadMarker.create()); 37 37 MapMode oldMapMode = Main.map.mapMode; … … 40 40 assertTrue(Main.map.selectMapMode(oldMapMode)); 41 41 } finally { 42 Main. main.removeLayer(layer);42 Main.getLayerManager().removeLayer(layer); 43 43 } 44 44 } -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/SelectActionTest.java
r10396 r10436 105 105 106 106 Main.pref = new PreferencesMock(); 107 Main. main.addLayer(layer);107 Main.getLayerManager().addLayer(layer); 108 108 try { 109 109 SelectAction action = new SelectActionMock(Main.map, dataSet, layer); … … 160 160 } finally { 161 161 // Ensure we clean the place before leaving, even if test fails. 162 Main. main.removeLayer(layer);162 Main.getLayerManager().removeLayer(layer); 163 163 } 164 164 } -
trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictAddCommandTest.java
r10364 r10436 35 35 JOSMFixture.createUnitTestFixture().init(true); 36 36 layer = new OsmDataLayer(new DataSet(), null, null); 37 Main. main.addLayer(layer);37 Main.getLayerManager().addLayer(layer); 38 38 } 39 39 … … 43 43 @AfterClass 44 44 public static void tearDownAfterClass() { 45 Main. main.removeLayer(layer);45 Main.getLayerManager().removeLayer(layer); 46 46 } 47 47 -
trunk/test/unit/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommandTest.java
r9943 r10436 37 37 JOSMFixture.createUnitTestFixture().init(true); 38 38 layer = new OsmDataLayer(new DataSet(), null, null); 39 Main. main.addLayer(layer);39 Main.getLayerManager().addLayer(layer); 40 40 } 41 41 … … 45 45 @AfterClass 46 46 public static void tearDownAfterClass() { 47 Main. main.removeLayer(layer);47 Main.getLayerManager().removeLayer(layer); 48 48 } 49 49 -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialogTest.java
r10199 r10436 112 112 113 113 try { 114 Main. main.addLayer(layer);114 Main.getLayerManager().addLayer(layer); 115 115 assertEquals("", InspectPrimitiveDialog.buildMapPaintText()); 116 116 Node n = new Node(LatLon.ZERO); … … 126 126 InspectPrimitiveDialog.buildMapPaintText().replaceAll("@(\\p{XDigit})+", "")); 127 127 } finally { 128 Main. main.removeLayer(layer);128 Main.getLayerManager().removeLayer(layer); 129 129 } 130 130 } -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableTest.java
r10089 r10436 49 49 OsmDataLayer layer = new OsmDataLayer(ds, "", null); 50 50 try { 51 Main. main.addLayer(layer);51 Main.getLayerManager().addLayer(layer); 52 52 // Constructs models and table 53 53 MemberTableModel memberTableModel = new MemberTableModel(r, layer, null); … … 84 84 } 85 85 } finally { 86 Main. main.removeLayer(layer);86 Main.getLayerManager().removeLayer(layer); 87 87 } 88 88 } -
trunk/test/unit/org/openstreetmap/josm/gui/layer/GpxLayerTest.java
r9949 r10436 196 196 GpxLayer layer = getMinimalGpxLayer(); 197 197 try { 198 Main. main.addLayer(layer);198 Main.getLayerManager().addLayer(layer); 199 199 assertTrue(layer.getMenuEntries().length > 0); 200 200 layer.paint(TestUtils.newGraphics(), Main.map.mapView, layer.data.getMetaBounds()); 201 201 } finally { 202 Main. main.removeLayer(layer);202 Main.getLayerManager().removeLayer(layer); 203 203 } 204 204 } -
trunk/test/unit/org/openstreetmap/josm/gui/layer/OsmDataLayerTest.java
r10205 r10436 44 44 OsmDataLayer layer = new OsmDataLayer(ds, "", null); 45 45 try { 46 Main. main.addLayer(layer);46 Main.getLayerManager().addLayer(layer); 47 47 int n = OsmDataLayer.PROPERTY_RECENT_RELATIONS_NUMBER.get(); 48 48 assertTrue(n > 0); … … 60 60 assertTrue(layer.getRecentRelations().isEmpty()); 61 61 } finally { 62 Main. main.removeLayer(layer);62 Main.getLayerManager().removeLayer(layer); 63 63 } 64 64 } … … 134 134 OsmDataLayer layer = new OsmDataLayer(ds, "", null); 135 135 try { 136 Main. main.addLayer(layer);136 Main.getLayerManager().addLayer(layer); 137 137 assertTrue(layer.getMenuEntries().length > 0); 138 138 layer.paint(TestUtils.newGraphics(), Main.map.mapView, new Bounds(LatLon.ZERO)); 139 139 } finally { 140 Main. main.removeLayer(layer);140 Main.getLayerManager().removeLayer(layer); 141 141 } 142 142 } -
trunk/test/unit/org/openstreetmap/josm/gui/layer/TMSLayerTest.java
r9680 r10436 50 50 private static void test(ImageryType expected, TMSLayer layer) { 51 51 try { 52 Main. main.addLayer(layer);52 Main.getLayerManager().addLayer(layer); 53 53 assertEquals(expected, layer.getInfo().getImageryType()); 54 54 } finally { 55 55 // Ensure we clean the place before leaving, even if test fails. 56 Main. main.removeLayer(layer);56 Main.getLayerManager().removeLayer(layer); 57 57 } 58 58 } -
trunk/test/unit/org/openstreetmap/josm/gui/layer/ValidatorLayerTest.java
r9881 r10436 33 33 try { 34 34 layer = new ValidatorLayer(); 35 Main. main.addLayer(layer);35 Main.getLayerManager().addLayer(layer); 36 36 assertFalse(layer.isMergable(null)); 37 37 assertNotNull(layer.getIcon()); … … 42 42 // Ensure we clean the place before leaving, even if test fails. 43 43 if (layer != null) { 44 Main. main.removeLayer(layer);44 Main.getLayerManager().removeLayer(layer); 45 45 } 46 46 } -
trunk/test/unit/org/openstreetmap/josm/gui/layer/WMSLayerTest.java
r9669 r10436 30 30 public void testWMSLayer() { 31 31 WMSLayer wms = new WMSLayer(new ImageryInfo("test wms", "http://localhost")); 32 Main. main.addLayer(wms);32 Main.getLayerManager().addLayer(wms); 33 33 try { 34 34 assertEquals(ImageryType.WMS, wms.getInfo().getImageryType()); 35 35 } finally { 36 36 // Ensure we clean the place before leaving, even if test fails. 37 Main. main.removeLayer(wms);37 Main.getLayerManager().removeLayer(wms); 38 38 } 39 39 } -
trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayerTest.java
r10396 r10436 43 43 GpxLayer gpxLayer = new GpxLayer(reader.getGpxData()); 44 44 try { 45 Main. main.addLayer(gpxLayer);45 Main.getLayerManager().addLayer(gpxLayer); 46 46 assertEquals(1, Main.getLayerManager().getLayers().size()); 47 47 new Loader( … … 62 62 } finally { 63 63 // Ensure we clean the place before leaving, even if test fails. 64 Main. main.removeLayer(gpxLayer);64 Main.getLayerManager().removeLayer(gpxLayer); 65 65 } 66 66 } -
trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongTrackActionTest.java
r9817 r10436 32 32 final OsmDataLayer layer = new OsmDataLayer(new DataSet(), DownloadAlongTrackActionTest.class.getName(), null); 33 33 try { 34 Main. main.addLayer(layer);34 Main.getLayerManager().addLayer(layer); 35 35 // Perform action 36 36 final GpxData gpx = GpxReaderTest.parseGpxData(TestUtils.getTestDataRoot() + file); … … 38 38 } finally { 39 39 // Ensure we clean the place before leaving, even if test fails. 40 Main. main.removeLayer(layer);40 Main.getLayerManager().removeLayer(layer); 41 41 } 42 42 } -
trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackActionTest.java
r10222 r10436 47 47 TMSLayer layer = new TMSLayer(new ImageryInfo("OSM TMS", "https://a.tile.openstreetmap.org/{zoom}/{x}/{y}.png", "tms", null, null)); 48 48 try { 49 Main. main.addLayer(layer);49 Main.getLayerManager().addLayer(layer); 50 50 TMSLayer.getCache().clear(); 51 51 assertTrue(TMSLayer.getCache().getMatching(".*").isEmpty()); … … 58 58 } finally { 59 59 // Ensure we clean the place before leaving, even if test fails. 60 Main. main.removeLayer(layer);60 Main.getLayerManager().removeLayer(layer); 61 61 } 62 62 } -
trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandlerTest.java
r9732 r10436 59 59 OsmDataLayer layer = new OsmDataLayer(new DataSet(), "", null); 60 60 try { 61 Main. main.addLayer(layer);61 Main.getLayerManager().addLayer(layer); 62 62 newHandler(null).handle(); 63 63 } finally { 64 Main. main.removeLayer(layer);64 Main.getLayerManager().removeLayer(layer); 65 65 } 66 66 } … … 96 96 OsmDataLayer layer = new OsmDataLayer(new DataSet(), "", null); 97 97 try { 98 Main. main.addLayer(layer);98 Main.getLayerManager().addLayer(layer); 99 99 newHandler("https://localhost?lat=0&lon=0").handle(); 100 100 } finally { 101 Main. main.removeLayer(layer);101 Main.getLayerManager().removeLayer(layer); 102 102 } 103 103 } -
trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandlerTest.java
r10116 r10436 59 59 OsmDataLayer layer = new OsmDataLayer(new DataSet(), "", null); 60 60 try { 61 Main. main.addLayer(layer);61 Main.getLayerManager().addLayer(layer); 62 62 newHandler(null).handle(); 63 63 } finally { 64 Main. main.removeLayer(layer);64 Main.getLayerManager().removeLayer(layer); 65 65 } 66 66 } … … 96 96 OsmDataLayer layer = new OsmDataLayer(new DataSet(), "", null); 97 97 try { 98 Main. main.addLayer(layer);98 Main.getLayerManager().addLayer(layer); 99 99 newHandler("https://localhost?way=0,0;1,1").handle(); 100 100 } finally { 101 Main. main.removeLayer(layer);101 Main.getLayerManager().removeLayer(layer); 102 102 } 103 103 } -
trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandlerTest.java
r10364 r10436 96 96 } finally { 97 97 for (OsmDataLayer layer : Main.getLayerManager().getLayersOfType(OsmDataLayer.class)) { 98 Main. main.removeLayer(layer);98 Main.getLayerManager().removeLayer(layer); 99 99 } 100 100 }
Note:
See TracChangeset
for help on using the changeset viewer.