Ignore:
Timestamp:
2016-01-31T11:37:54+01:00 (9 years ago)
Author:
nokutu
Message:

[mapillary] Construct images with a LatLon object instead of two doubles representing lat/lon

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

Legend:

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

    r31512 r32033  
    4040  @Test(expected = IIOException.class)
    4141  public void testInvalidFiles() throws IOException {
    42     MapillaryImportedImage img = new MapillaryImportedImage(0, 0, 0, null);
     42    MapillaryImportedImage img = new MapillaryImportedImage(new LatLon(0, 0), 0, null);
    4343    assertEquals(null, img.getImage());
    4444    assertEquals(null, img.getFile());
    4545
    46     img = new MapillaryImportedImage(0, 0, 0, new File(""));
     46    img = new MapillaryImportedImage(new LatLon(0, 0), 0, new File(""));
    4747    assertEquals(new File(""), img.getFile());
    4848    img.getImage();
  • applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/MapillaryAbstractImageTest.java

    r31460 r32033  
    1010import org.junit.Test;
    1111import org.openstreetmap.josm.Main;
     12import org.openstreetmap.josm.data.coor.LatLon;
    1213
    1314/**
     
    2324    TimeZone.setDefault(TimeZone.getTimeZone("GMT+0745"));
    2425
    25     MapillaryAbstractImage mai = new MapillaryImportedImage(0, 0, 0, null);
     26    MapillaryAbstractImage mai = new MapillaryImportedImage(new LatLon(0, 0), 0, null);
    2627    mai.setCapturedAt(1044087606000l); // in timezone GMT+0745 this is Saturday, February 1, 2003 16:05:06
    2728
  • applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/MapillaryDataTest.java

    r31909 r32033  
    99import org.junit.Before;
    1010import org.junit.Test;
     11import org.openstreetmap.josm.data.coor.LatLon;
    1112
    1213/**
     
    3132  @Before
    3233  public void setUp() {
    33     this.img1 = new MapillaryImage("key1", 0.1, 0.1, 90);
    34     this.img2 = new MapillaryImage("key2", 0.2, 0.2, 90);
    35     this.img3 = new MapillaryImage("key3", 0.3, 0.3, 90);
    36     this.img4 = new MapillaryImage("key4", 0.4, 0.4, 90);
     34    this.img1 = new MapillaryImage("key1", new LatLon(0.1, 0.1), 90);
     35    this.img2 = new MapillaryImage("key2", new LatLon(0.2, 0.2), 90);
     36    this.img3 = new MapillaryImage("key3", new LatLon(0.3, 0.3), 90);
     37    this.img4 = new MapillaryImage("key4", new LatLon(0.4, 0.4), 90);
    3738    this.seq = new MapillarySequence();
    3839
     
    7475  public void sizeTest() {
    7576    assertEquals(4, this.data.size());
    76     this.data.add(new MapillaryImage("key5", 0.1, 0.1, 90));
     77    this.data.add(new MapillaryImage("key5", new LatLon(0.1, 0.1), 90));
    7778    assertEquals(5, this.data.size());
    7879  }
  • applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/MapillarySequenceTest.java

    r31460 r32033  
    88import org.junit.Before;
    99import org.junit.Test;
     10import org.openstreetmap.josm.data.coor.LatLon;
    1011
    1112/**
     
    2930  @Before
    3031  public void setUp() {
    31     this.img1 = new MapillaryImage("key1", 0.1, 0.1, 90);
    32     this.img2 = new MapillaryImage("key2", 0.2, 0.2, 90);
    33     this.img3 = new MapillaryImage("key3", 0.3, 0.3, 90);
    34     this.img4 = new MapillaryImage("key4", 0.4, 0.4, 90);
     32    this.img1 = new MapillaryImage("key1", new LatLon(0.1, 0.1), 90);
     33    this.img2 = new MapillaryImage("key2", new LatLon(0.2, 0.2), 90);
     34    this.img3 = new MapillaryImage("key3", new LatLon(0.3, 0.3), 90);
     35    this.img4 = new MapillaryImage("key4", new LatLon(0.4, 0.4), 90);
    3536    this.seq = new MapillarySequence();
    3637
     
    6364    // that is not in the sequence.
    6465    try {
    65       this.seq.next(new MapillaryImage("key5", 0.5, 0.5, 90));
     66      this.seq.next(new MapillaryImage("key5", new LatLon(0.5, 0.5), 90));
    6667      fail();
    6768    } catch (IllegalArgumentException e) {
     
    7273    // image that is not in the sequence.
    7374    try {
    74       this.seq.previous(new MapillaryImage("key5", 0.5, 0.5, 90));
     75      this.seq.previous(new MapillaryImage("key5", new LatLon(0.5, 0.5), 90));
    7576      fail();
    7677    } catch (IllegalArgumentException e) {
  • applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/history/MapillaryRecordTest.java

    r31909 r32033  
    1111import org.junit.Before;
    1212import org.junit.Test;
     13import org.openstreetmap.josm.data.coor.LatLon;
    1314import org.openstreetmap.josm.plugins.mapillary.AbstractTest;
    1415import org.openstreetmap.josm.plugins.mapillary.MapillaryAbstractImage;
     
    4344  public void setUp() {
    4445    this.record = new MapillaryRecord();
    45     this.img1 = new MapillaryImage("key1", 0.1, 0.1, 0.1);
    46     this.img2 = new MapillaryImage("key2", 0.2, 0.2, 0.2);
    47     this.img3 = new MapillaryImage("key3", 0.3, 0.3, 0.3);
     46    this.img1 = new MapillaryImage("key1", new LatLon(0.1, 0.1), 0.1);
     47    this.img2 = new MapillaryImage("key2", new LatLon(0.2, 0.2), 0.2);
     48    this.img3 = new MapillaryImage("key3", new LatLon(0.3, 0.3), 0.3);
    4849    MapillaryLayer.getInstance().getData().getImages().clear();
    4950  }
Note: See TracChangeset for help on using the changeset viewer.