Changeset 33847 in osm for applications
- Timestamp:
- 2017-11-21T01:24:57+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModelTest.java
r32925 r33847 16 16 import org.junit.Rule; 17 17 import org.junit.Test; 18 import org.openstreetmap.josm.Main;19 18 import org.openstreetmap.josm.data.coor.LatLon; 20 19 import org.openstreetmap.josm.data.osm.DataSet; … … 23 22 import org.openstreetmap.josm.data.osm.Relation; 24 23 import org.openstreetmap.josm.data.osm.Way; 24 import org.openstreetmap.josm.gui.MainApplication; 25 25 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 26 26 import org.openstreetmap.josm.testutils.JOSMTestRules; … … 137 137 OsmDataLayer layer2 = new OsmDataLayer(new DataSet(), "layer2", null); 138 138 139 Main .getLayerManager().addLayer(layer1);140 Main .getLayerManager().addLayer(layer2);139 MainApplication.getLayerManager().addLayer(layer1); 140 MainApplication.getLayerManager().addLayer(layer2); 141 141 142 142 JosmSelectionListModel model = new JosmSelectionListModel(layer1); 143 Main .getLayerManager().addActiveLayerChangeListener(model);143 MainApplication.getLayerManager().addActiveLayerChangeListener(model); 144 144 // switch from edit layer1 to edit layer2. content of the JOSM selection 145 145 // should be empty thereafter 146 Main .getLayerManager().setActiveLayer(layer1);147 Main .getLayerManager().setActiveLayer(layer2);146 MainApplication.getLayerManager().setActiveLayer(layer1); 147 MainApplication.getLayerManager().setActiveLayer(layer2); 148 148 assertEquals(0, model.getSize()); 149 149 … … 151 151 // be displayed in the JOSM selection list 152 152 ds.setSelected(Collections.singleton(objects.get(0))); 153 Main .getLayerManager().setActiveLayer(layer1);153 MainApplication.getLayerManager().setActiveLayer(layer1); 154 154 assertEquals(1, model.getSize()); 155 155 assertEquals(objects.get(0), model.getElementAt(0)); … … 157 157 // switch to a "null" edit layer (i.e. no edit layer)- nothing should 158 158 // be displayed in the selection list 159 Main .getLayerManager().removeLayer(layer2);160 Main .getLayerManager().removeLayer(layer1);159 MainApplication.getLayerManager().removeLayer(layer2); 160 MainApplication.getLayerManager().removeLayer(layer1); 161 161 assertEquals(0, model.getSize()); 162 162 163 Main .getLayerManager().removeActiveLayerChangeListener(model);163 MainApplication.getLayerManager().removeActiveLayerChangeListener(model); 164 164 } 165 165 }
Note:
See TracChangeset
for help on using the changeset viewer.