Changeset 31460 in osm for applications/editors/josm/plugins/mapillary/test
- Timestamp:
- 2015-08-06T16:55:15+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary
- Files:
-
- 4 added
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/AbstractTest.java
r31456 r31460 12 12 public abstract class AbstractTest { 13 13 14 private static boolean started = false;15 16 14 /** 17 15 * Initiates the basic parts of JOSM. -
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/ImportTest.java
r31456 r31460 10 10 import javax.imageio.IIOException; 11 11 12 import org.apache.commons.imaging.common.RationalNumber;13 import org.apache.commons.imaging.formats.tiff.constants.GpsTagConstants;14 12 import org.openstreetmap.josm.data.coor.LatLon; 15 13 import org.openstreetmap.josm.plugins.mapillary.actions.MapillaryImportAction; 16 import org.openstreetmap.josm.plugins.mapillary.utils.MapillaryUtils;17 14 18 15 /** … … 51 48 img.getImage(); 52 49 } 53 54 /**55 * Test degMinSecToDouble method.56 */57 @Test58 public void degMinSecToDoubleTest() {59 RationalNumber[] num = new RationalNumber[3];60 num[0] = new RationalNumber(1, 1);61 num[1] = new RationalNumber(0, 1);62 num[2] = new RationalNumber(0, 1);63 String ref = GpsTagConstants.GPS_TAG_GPS_LATITUDE_REF_VALUE_NORTH;64 assertEquals(1, MapillaryUtils.degMinSecToDouble(num, ref), 0.01);65 ref = GpsTagConstants.GPS_TAG_GPS_LATITUDE_REF_VALUE_SOUTH;66 assertEquals(-1, MapillaryUtils.degMinSecToDouble(num, ref), 0.01);67 num[0] = new RationalNumber(180, 1);68 assertEquals(-180, MapillaryUtils.degMinSecToDouble(num, ref), 0.01);69 num[0] = new RationalNumber(190, 1);70 assertEquals(170, MapillaryUtils.degMinSecToDouble(num, ref), 0.01);71 }72 50 } -
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/MapillaryAbstractImageTest.java
r31445 r31460 42 42 } 43 43 44 private void testGetDate(String expected, MapillaryAbstractImage img,44 private static void testGetDate(String expected, MapillaryAbstractImage img, 45 45 boolean isoDates, boolean displayHour, boolean format24) { 46 46 Main.pref.put("iso.dates", isoDates); -
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/oauth/UploadTest.java
r31459 r31460 1 package org.openstreetmap.josm.plugins.mapillary ;1 package org.openstreetmap.josm.plugins.mapillary.oauth; 2 2 3 3 import static org.junit.Assert.assertEquals; … … 18 18 import org.junit.Test; 19 19 import org.openstreetmap.josm.data.coor.LatLon; 20 import org.openstreetmap.josm.plugins.mapillary.AbstractTest; 21 import org.openstreetmap.josm.plugins.mapillary.MapillaryImportedImage; 20 22 import org.openstreetmap.josm.plugins.mapillary.actions.MapillaryImportAction; 21 23 import org.openstreetmap.josm.plugins.mapillary.oauth.UploadUtils; 22 24 import org.openstreetmap.josm.plugins.mapillary.utils.MapillaryUtils; 23 25 26 /** 27 * Tests the {@link UploadUtils} class. 28 * 29 * @author nokutu 30 * @see UploadUtils 31 */ 24 32 public class UploadTest extends AbstractTest { 25 33 26 34 /** 27 * Tests the updateFile method from {@link MapillaryImportAction} class.35 * Tests the {@link UploadUtils#updateFile(MapillaryImportedImage)} method. 28 36 */ 29 37 @Test -
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/utils/TestUtil.java
r31456 r31460 1 1 package org.openstreetmap.josm.plugins.mapillary.utils; 2 2 3 import java.io.File;4 3 5 4 import org.openstreetmap.josm.Main; 6 5 import org.openstreetmap.josm.data.projection.Projections; 7 import org.openstreetmap.josm.plugins.PluginException;8 import org.openstreetmap.josm.plugins.PluginInformation;9 6 import org.openstreetmap.josm.plugins.mapillary.MapillaryLayer; 10 import org.openstreetmap.josm.plugins.mapillary.MapillaryPlugin;11 7 import org.openstreetmap.josm.tools.I18n; 12 8
Note:
See TracChangeset
for help on using the changeset viewer.