Ignore:
Timestamp:
2015-08-11T15:43:11+02:00 (10 years ago)
Author:
nokutu
Message:

Fixed bug related to progress numbers during upload and added unit test for PluginState class

Location:
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/commands/MapillaryRecordTest.java

    r31476 r31482  
    4141  @Test
    4242  public void commandTest() {
    43     MapillaryCommand cmd1 = new CommandMoveImage(
     43    MapillaryCommand cmd12 = new CommandMoveImage(
    4444        Arrays.asList(new MapillaryAbstractImage[] { this.img1, this.img2 }),
    4545        0.1, 0.1);
    46     MapillaryCommand cmd2 = new CommandMoveImage(
     46    MapillaryCommand cmd23 = new CommandMoveImage(
    4747        Arrays.asList(new MapillaryAbstractImage[] { this.img2, this.img3 }),
    4848        0.1, 0.1);
    49     MapillaryCommand cmd3 = new CommandMoveImage(
     49    MapillaryCommand cmd13 = new CommandMoveImage(
    5050        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 }),
    5154        0.1, 0.1);
    5255    MapillaryCommand cmd31 = new CommandMoveImage(
    5356        Arrays.asList(new MapillaryAbstractImage[] { this.img3, this.img1 }),
    5457        0.2, 0.2);
    55     this.record.addCommand(cmd1);
    56     this.record.addCommand(cmd2);
     58    this.record.addCommand(cmd12);
     59    this.record.addCommand(cmd23);
    5760
    5861    assertEquals(1, this.record.position);
     
    6467    assertEquals(2, this.record.commandList.size());
    6568
    66     this.record.addCommand(cmd3);
     69    this.record.addCommand(cmd1);
    6770
    6871    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());
    7077
    7178    this.record.undo();
    7279    this.record.redo();
    7380
    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());
    7683
    7784    this.record.addCommand(cmd31);
    7885
    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());
    8193  }
    8294
Note: See TracChangeset for help on using the changeset viewer.