Changeset 12641 in josm for trunk/test


Ignore:
Timestamp:
2017-08-25T03:01:22+02:00 (2 years ago)
Author:
Don-vip
Message:

see #15182 - deprecate Main.main.undoRedo. Replacement: gui.MainApplication.undoRedo

Location:
trunk/test/unit/org/openstreetmap/josm
Files:
4 edited

Legend:

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

    r12636 r12641  
    199199        final SplitWayAction.SplitWayResult result = SplitWayAction.splitWay(
    200200                layer, w2, SplitWayAction.buildSplitChunks(w2, Arrays.asList(n3, n4, n5)), new ArrayList<OsmPrimitive>(), strategy);
    201         Main.main.undoRedo.add(result.getCommand());
     201        MainApplication.undoRedo.add(result.getCommand());
    202202
    203203        assertEquals(6, route.getMembersCount());
  • trunk/test/unit/org/openstreetmap/josm/actions/mapmode/DrawActionTest.java

    r12636 r12641  
    1717import org.junit.Rule;
    1818import org.junit.Test;
    19 import org.openstreetmap.josm.Main;
    2019import org.openstreetmap.josm.data.coor.EastNorth;
    2120import org.openstreetmap.josm.data.osm.DataSet;
     
    9392            assertNotNull(renderer.getListCellRendererComponent(lstPrimitives, n3, 0, false, false));
    9493
    95             Main.main.undoRedo.undo();
     94            MainApplication.undoRedo.undo();
    9695
    9796            assertEquals(2, w.getNodesCount());
  • trunk/test/unit/org/openstreetmap/josm/actions/upload/FixDataHookTest.java

    r12563 r12641  
    1212import org.junit.Rule;
    1313import org.junit.Test;
    14 import org.openstreetmap.josm.Main;
    1514import org.openstreetmap.josm.command.PseudoCommand;
    1615import org.openstreetmap.josm.command.SequenceCommand;
     
    2019import org.openstreetmap.josm.data.osm.Relation;
    2120import org.openstreetmap.josm.data.osm.Way;
     21import org.openstreetmap.josm.gui.MainApplication;
    2222import org.openstreetmap.josm.testutils.JOSMTestRules;
    2323
     
    4242    public void testCheckUpload() {
    4343        // Empty data set
    44         Main.main.undoRedo.commands.clear();
     44        MainApplication.undoRedo.commands.clear();
    4545        new FixDataHook().checkUpload(new APIDataSet());
    46         assertTrue(Main.main.undoRedo.commands.isEmpty());
     46        assertTrue(MainApplication.undoRedo.commands.isEmpty());
    4747
    4848        // Complete data set
     
    7777        ads.init(Arrays.asList(emptyNode, emptyWay, emptyRelation, w1, w2, w3, w4, w5, w6, w7, r1, r2));
    7878
    79         Main.main.undoRedo.commands.clear();
     79        MainApplication.undoRedo.commands.clear();
    8080        new FixDataHook().checkUpload(ads);
    81         assertEquals(1, Main.main.undoRedo.commands.size());
     81        assertEquals(1, MainApplication.undoRedo.commands.size());
    8282
    83         SequenceCommand seq = (SequenceCommand) Main.main.undoRedo.commands.iterator().next();
     83        SequenceCommand seq = (SequenceCommand) MainApplication.undoRedo.commands.iterator().next();
    8484        Collection<? extends OsmPrimitive> prims = seq.getParticipatingPrimitives();
    8585        assertNotNull(prims);
  • trunk/test/unit/org/openstreetmap/josm/gui/dialogs/CommandStackDialogTest.java

    r12636 r12641  
    77import org.junit.Rule;
    88import org.junit.Test;
    9 import org.openstreetmap.josm.Main;
    109import org.openstreetmap.josm.TestUtils;
    1110import org.openstreetmap.josm.command.Command;
     
    5251            Command cmd1 = TestUtils.newCommand();
    5352            Command cmd2 = TestUtils.newCommand();
    54             Main.main.undoRedo.add(cmd1);
    55             Main.main.undoRedo.add(cmd2);
    56             Main.main.undoRedo.undo(1);
     53            MainApplication.undoRedo.add(cmd1);
     54            MainApplication.undoRedo.add(cmd2);
     55            MainApplication.undoRedo.undo(1);
    5756
    58             assertFalse(Main.main.undoRedo.commands.isEmpty());
    59             assertFalse(Main.main.undoRedo.redoCommands.isEmpty());
     57            assertFalse(MainApplication.undoRedo.commands.isEmpty());
     58            assertFalse(MainApplication.undoRedo.redoCommands.isEmpty());
    6059
    6160            MapFrame map = MainApplication.getMap();
     
    6867            assertFalse(dlg.isVisible());
    6968        } finally {
    70             Main.main.undoRedo.clean();
     69            MainApplication.undoRedo.clean();
    7170            MainApplication.getLayerManager().removeLayer(layer);
    7271        }
Note: See TracChangeset for help on using the changeset viewer.