Changeset 11484 in josm for trunk/test


Ignore:
Timestamp:
2017-01-19T23:34:17+01:00 (3 years ago)
Author:
Don-vip
Message:

fix #14209 - prefer TAG_DATETIME_ORIGINAL (patch by holgermappt, regression from r9499) + add non-regression unit test

Location:
trunk/test
Files:
2 added
1 edited

Legend:

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

    r11035 r11484  
    119119        assertEquals("2015-11-08T15:33:27.500", dateStr);
    120120    }
     121
     122    /**
     123     * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/14209">#14209</a>
     124     * @throws IOException if an error occurs during reading
     125     */
     126    @Test
     127    public void testTicket14209() throws IOException {
     128        File file = new File(TestUtils.getRegressionDataFile(14209, "0MbEfj1S--.1.jpg"));
     129        String dateStr = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS").format(ExifReader.readTime(file));
     130        assertEquals("2017-01-16T18:27:00.000", dateStr);
     131    }
    121132}
Note: See TracChangeset for help on using the changeset viewer.