Ignore:
Timestamp:
2015-08-05T16:28:26+02:00 (9 years ago)
Author:
nokutu
Message:

Created several utils classes

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

Legend:

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

    r31425 r31456  
    22
    33import org.junit.BeforeClass;
    4 import org.openstreetmap.josm.plugins.mapillary.util.TestUtil;
     4import org.openstreetmap.josm.plugins.mapillary.utils.TestUtil;
    55
    66/**
  • applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/ImportTest.java

    r31425 r31456  
    1414import org.openstreetmap.josm.data.coor.LatLon;
    1515import org.openstreetmap.josm.plugins.mapillary.actions.MapillaryImportAction;
     16import org.openstreetmap.josm.plugins.mapillary.utils.MapillaryUtils;
    1617
    1718/**
     
    6162    num[2] = new RationalNumber(0, 1);
    6263    String ref = GpsTagConstants.GPS_TAG_GPS_LATITUDE_REF_VALUE_NORTH;
    63     assertEquals(1, MapillaryImportAction.degMinSecToDouble(num, ref), 0.01);
     64    assertEquals(1, MapillaryUtils.degMinSecToDouble(num, ref), 0.01);
    6465    ref = GpsTagConstants.GPS_TAG_GPS_LATITUDE_REF_VALUE_SOUTH;
    65     assertEquals(-1, MapillaryImportAction.degMinSecToDouble(num, ref), 0.01);
     66    assertEquals(-1, MapillaryUtils.degMinSecToDouble(num, ref), 0.01);
    6667    num[0] = new RationalNumber(180, 1);
    67     assertEquals(-180, MapillaryImportAction.degMinSecToDouble(num, ref), 0.01);
     68    assertEquals(-180, MapillaryUtils.degMinSecToDouble(num, ref), 0.01);
    6869    num[0] = new RationalNumber(190, 1);
    69     assertEquals(170, MapillaryImportAction.degMinSecToDouble(num, ref), 0.01);
     70    assertEquals(170, MapillaryUtils.degMinSecToDouble(num, ref), 0.01);
    7071  }
    71 
    7272}
  • applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/UploadTest.java

    r31455 r31456  
    1919import org.openstreetmap.josm.data.coor.LatLon;
    2020import org.openstreetmap.josm.plugins.mapillary.actions.MapillaryImportAction;
    21 import org.openstreetmap.josm.plugins.mapillary.oauth.OAuthUtils;
     21import org.openstreetmap.josm.plugins.mapillary.oauth.UploadUtils;
     22import org.openstreetmap.josm.plugins.mapillary.utils.MapillaryUtils;
    2223
    2324public class UploadTest extends AbstractTest {
     
    3334    File updatedFile = null;
    3435    try {
    35       updatedFile = OAuthUtils.updateFile(img);
     36      updatedFile = UploadUtils.updateFile(img);
    3637      ImageMetadata metadata = Imaging.getMetadata(updatedFile);
    3738      final JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;
     
    4849      assertTrue(jpegMetadata
    4950          .findEXIFValueWithExactMatch(ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL) != null);
    50       assertEquals(0, MapillaryImportAction.degMinSecToDouble(
     51      assertEquals(0, MapillaryUtils.degMinSecToDouble(
    5152          (RationalNumber[]) jpegMetadata.findEXIFValueWithExactMatch(
    5253              GpsTagConstants.GPS_TAG_GPS_LATITUDE).getValue(),
     
    5556                  GpsTagConstants.GPS_TAG_GPS_LATITUDE_REF).getValue()
    5657              .toString()), 0.01);
    57       assertEquals(0, MapillaryImportAction.degMinSecToDouble(
     58      assertEquals(0, MapillaryUtils.degMinSecToDouble(
    5859          (RationalNumber[]) jpegMetadata.findEXIFValueWithExactMatch(
    5960              GpsTagConstants.GPS_TAG_GPS_LONGITUDE).getValue(),
  • applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/utils/TestUtil.java

    r31455 r31456  
    1 package org.openstreetmap.josm.plugins.mapillary.util;
     1package org.openstreetmap.josm.plugins.mapillary.utils;
    22
    33import java.io.File;
Note: See TracChangeset for help on using the changeset viewer.