Changeset 14281 in josm for trunk/test


Ignore:
Timestamp:
2018-09-30T00:46:01+02:00 (6 years ago)
Author:
Don-vip
Message:

see #12726 - accessors for undo/redo commands

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

Legend:

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

    r14134 r14281  
    4242    public void testCheckUpload() {
    4343        // Empty data set
    44         UndoRedoHandler.getInstance().commands.clear();
     44        UndoRedoHandler.getInstance().getUndoCommands().clear();
    4545        new FixDataHook().checkUpload(new APIDataSet());
    46         assertTrue(UndoRedoHandler.getInstance().commands.isEmpty());
     46        assertTrue(UndoRedoHandler.getInstance().getUndoCommands().isEmpty());
    4747
    4848        // Complete data set (except empty node which cannot be tested anymore)
     
    7676        ads.init(new DataSet(emptyWay, emptyRelation, w1, w2, w3, w4, w5, w6, w7, r1, r2));
    7777
    78         UndoRedoHandler.getInstance().commands.clear();
     78        UndoRedoHandler.getInstance().getUndoCommands().clear();
    7979        new FixDataHook().checkUpload(ads);
    80         assertEquals(1, UndoRedoHandler.getInstance().commands.size());
     80        assertEquals(1, UndoRedoHandler.getInstance().getUndoCommands().size());
    8181
    82         SequenceCommand seq = (SequenceCommand) UndoRedoHandler.getInstance().commands.iterator().next();
     82        SequenceCommand seq = (SequenceCommand) UndoRedoHandler.getInstance().getUndoCommands().iterator().next();
    8383        Collection<? extends OsmPrimitive> prims = seq.getParticipatingPrimitives();
    8484        assertNotNull(prims);
  • trunk/test/unit/org/openstreetmap/josm/gui/dialogs/CommandStackDialogTest.java

    r14138 r14281  
    5757            UndoRedoHandler.getInstance().undo(1);
    5858
    59             assertFalse(UndoRedoHandler.getInstance().commands.isEmpty());
    60             assertFalse(UndoRedoHandler.getInstance().redoCommands.isEmpty());
     59            assertTrue(UndoRedoHandler.getInstance().hasUndoCommands());
     60            assertTrue(UndoRedoHandler.getInstance().hasRedoCommands());
    6161
    6262            MapFrame map = MainApplication.getMap();
Note: See TracChangeset for help on using the changeset viewer.