Changeset 7959 in josm
- Timestamp:
- 2015-01-11T23:32:39+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/tools/ExifReaderTest.java
r7937 r7959 22 22 public class ExifReaderTest { 23 23 24 private File sampleFile;24 private File orientationSampleFile, directionSampleFile; 25 25 26 26 /** … … 30 30 @Before 31 31 public void setUp() throws Exception { 32 sampleFile = new File("data_nodist/exif-direction-example.jpg"); 32 directionSampleFile = new File("data_nodist/exif-example_direction.jpg"); 33 orientationSampleFile = new File("data_nodist/exif-example_orientation=6.jpg"); 33 34 } 34 35 … … 39 40 @Test 40 41 public void testReadTime() throws ParseException { 41 Date date = ExifReader.readTime( sampleFile);42 Date date = ExifReader.readTime(directionSampleFile); 42 43 assertEquals(new GregorianCalendar(2010, Calendar.MAY, 15, 17, 12, 05).getTime(), date); 43 44 } … … 48 49 @Test 49 50 public void testReadOrientation() { 50 Integer orientation = ExifReader.readOrientation( sampleFile);51 assertEquals(Integer.valueOf( 1), orientation);51 Integer orientation = ExifReader.readOrientation(orientationSampleFile); 52 assertEquals(Integer.valueOf(6), orientation); 52 53 } 53 54 … … 57 58 @Test 58 59 public void testReadLatLon() { 59 LatLon latlon = ExifReader.readLatLon( sampleFile);60 LatLon latlon = ExifReader.readLatLon(directionSampleFile); 60 61 assertNotNull(latlon); 61 62 DecimalFormat f = new DecimalFormat("00.0"); … … 69 70 @Test 70 71 public void testReadDirection() { 71 Double direction = ExifReader.readDirection( sampleFile);72 Double direction = ExifReader.readDirection(directionSampleFile); 72 73 assertEquals(new Double(46.5), direction); 73 74 }
Note:
See TracChangeset
for help on using the changeset viewer.