Changeset 33884 in osm


Ignore:
Timestamp:
2017-11-25T01:15:23+01:00 (7 years ago)
Author:
donvip
Message:

fix deprecation warnings

Location:
applications/editors/josm/plugins/pt_assistant/test/unit/org/openstreetmap/josm/plugins/pt_assistant
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/pt_assistant/test/unit/org/openstreetmap/josm/plugins/pt_assistant/actions/SplitRoundaboutTest.java

    r33429 r33884  
    1616import org.junit.Test;
    1717import org.openstreetmap.josm.Main;
    18 import org.openstreetmap.josm.actions.SplitWayAction;
    19 import org.openstreetmap.josm.actions.SplitWayAction.SplitWayResult;
     18import org.openstreetmap.josm.command.SplitWayCommand;
    2019import org.openstreetmap.josm.data.osm.DataSet;
    2120import org.openstreetmap.josm.data.osm.Node;
     
    2423import org.openstreetmap.josm.data.osm.SimplePrimitiveId;
    2524import org.openstreetmap.josm.data.osm.Way;
     25import org.openstreetmap.josm.gui.MainApplication;
    2626import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    2727import org.openstreetmap.josm.io.IllegalDataException;
     
    3030import org.openstreetmap.josm.testutils.JOSMTestRules;
    3131
     32/**
     33 * Unit tests of {@link SplitRoundabout}.
     34 */
    3235public class SplitRoundaboutTest extends AbstractTest {
    3336
     
    4750        ds = OsmReader.parseDataSet(new FileInputStream(AbstractTest.PATH_TO_ROUNDABOUT), null);
    4851        layer = new OsmDataLayer(ds, OsmDataLayer.createNewName(), null);
    49         Main.getLayerManager().addLayer(layer);
     52        MainApplication.getLayerManager().addLayer(layer);
    5053
    51         Main.pref.put("pt_assistant.roundabout-splitter.alignalways", true);
     54        Main.pref.putBoolean("pt_assistant.roundabout-splitter.alignalways", true);
    5255        action = new SplitRoundaboutAction();
    5356        r1 = (Way) ds.getPrimitiveById(new SimplePrimitiveId(293302077L, OsmPrimitiveType.WAY));
     
    6164        action.getRemoveRoundaboutFromRelationsCommand(w).executeCommand();
    6265        List<Node> splitNodes = action.getSplitNodes(w);
    63         SplitWayResult result = SplitWayAction.split(layer, w, splitNodes, Collections.emptyList());
    64         result.getCommand().executeCommand();
     66        SplitWayCommand result = SplitWayCommand.split(w, splitNodes, Collections.emptyList());
     67        result.executeCommand();
    6568        Collection<Way> splitWays = result.getNewWays();
    6669        splitWays.add(result.getOriginalWay());
  • applications/editors/josm/plugins/pt_assistant/test/unit/org/openstreetmap/josm/plugins/pt_assistant/data/StopToWayAssignerTest.java

    r33429 r33884  
    1414import org.openstreetmap.josm.plugins.pt_assistant.utils.StopToWayAssigner;
    1515
     16/**
     17 * Unit tests of {@link StopToWayAssigner}.
     18 */
    1619public class StopToWayAssignerTest extends AbstractTest {
    1720
Note: See TracChangeset for help on using the changeset viewer.