Changeset 7959 in josm


Ignore:
Timestamp:
2015-01-11T23:32:39+01:00 (10 years ago)
Author:
bastiK
Message:

closes #10962 - fix tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/ExifReaderTest.java

    r7937 r7959  
    2222public class ExifReaderTest {
    2323
    24     private File sampleFile;
     24    private File orientationSampleFile, directionSampleFile;
    2525   
    2626    /**
     
    3030    @Before
    3131    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");
    3334    }
    3435
     
    3940    @Test
    4041    public void testReadTime() throws ParseException {
    41         Date date = ExifReader.readTime(sampleFile);
     42        Date date = ExifReader.readTime(directionSampleFile);
    4243        assertEquals(new GregorianCalendar(2010, Calendar.MAY, 15, 17, 12, 05).getTime(), date);
    4344    }
     
    4849    @Test
    4950    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);
    5253    }
    5354   
     
    5758    @Test
    5859    public void testReadLatLon() {
    59         LatLon latlon = ExifReader.readLatLon(sampleFile);
     60        LatLon latlon = ExifReader.readLatLon(directionSampleFile);
    6061        assertNotNull(latlon);
    6162        DecimalFormat f = new DecimalFormat("00.0");
     
    6970    @Test
    7071    public void testReadDirection() {
    71         Double direction = ExifReader.readDirection(sampleFile);
     72        Double direction = ExifReader.readDirection(directionSampleFile);
    7273        assertEquals(new Double(46.5), direction);
    7374    }
Note: See TracChangeset for help on using the changeset viewer.