Changeset 31482 in osm for applications/editors/josm/plugins/mapillary/test
- Timestamp:
- 2015-08-11T15:43:11+02:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary
- Files:
-
- 1 added
- 1 edited
-
commands/MapillaryRecordTest.java (modified) (2 diffs)
-
utils/PluginStateTest.java (added)
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/commands/MapillaryRecordTest.java
r31476 r31482 41 41 @Test 42 42 public void commandTest() { 43 MapillaryCommand cmd1 = new CommandMoveImage( 43 MapillaryCommand cmd12 = new CommandMoveImage( 44 44 Arrays.asList(new MapillaryAbstractImage[] { this.img1, this.img2 }), 45 45 0.1, 0.1); 46 MapillaryCommand cmd2 = new CommandMoveImage( 46 MapillaryCommand cmd23 = new CommandMoveImage( 47 47 Arrays.asList(new MapillaryAbstractImage[] { this.img2, this.img3 }), 48 48 0.1, 0.1); 49 MapillaryCommand cmd3 = new CommandMoveImage( 49 MapillaryCommand cmd13 = new CommandMoveImage( 50 50 Arrays.asList(new MapillaryAbstractImage[] { this.img1, this.img3 }), 51 0.1, 0.1); 52 MapillaryCommand cmd1 = new CommandMoveImage( 53 Arrays.asList(new MapillaryAbstractImage[] { this.img1 }), 51 54 0.1, 0.1); 52 55 MapillaryCommand cmd31 = new CommandMoveImage( 53 56 Arrays.asList(new MapillaryAbstractImage[] { this.img3, this.img1 }), 54 57 0.2, 0.2); 55 this.record.addCommand(cmd1); 56 this.record.addCommand(cmd2); 58 this.record.addCommand(cmd12); 59 this.record.addCommand(cmd23); 57 60 58 61 assertEquals(1, this.record.position); … … 64 67 assertEquals(2, this.record.commandList.size()); 65 68 66 this.record.addCommand(cmd 3);69 this.record.addCommand(cmd1); 67 70 68 71 assertEquals(1, this.record.position); 69 assertEquals(2, this.record.commandList.size()); 72 73 this.record.addCommand(cmd13); 74 75 assertEquals(2, this.record.position); 76 assertEquals(3, this.record.commandList.size()); 70 77 71 78 this.record.undo(); 72 79 this.record.redo(); 73 80 74 assertEquals( 1, this.record.position);75 assertEquals( 2, this.record.commandList.size());81 assertEquals(2, this.record.position); 82 assertEquals(3, this.record.commandList.size()); 76 83 77 84 this.record.addCommand(cmd31); 78 85 79 assertEquals(1, this.record.position); 80 assertEquals(2, this.record.commandList.size()); 86 assertEquals(2, this.record.position); 87 assertEquals(3, this.record.commandList.size()); 88 89 this.record.addCommand(cmd1); 90 91 assertEquals(3, this.record.position); 92 assertEquals(4, this.record.commandList.size()); 81 93 } 82 94
Note:
See TracChangeset
for help on using the changeset viewer.
