Ignore:
Timestamp:
2016-01-16T18:47:23+01:00 (9 years ago)
Author:
donvip
Message:

[josm_opendata] simplify unit tests

Location:
applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/KmlReaderTest.java

    r30573 r31990  
    3535    @Test
    3636    public void testTicket10214() throws IOException, XMLStreamException, FactoryConfigurationError {
    37         File file = new File(TestUtils.getRegressionDataFile(10214, "utf8_test.kml"));
    38         try (InputStream is = new FileInputStream(file)) {
     37        try (InputStream is = TestUtils.getRegressionDataStream(10214, "utf8_test.kml")) {
    3938            NonRegFunctionalTests.testTicket10214(KmlReader.parseDataSet(is, null));
    4039        }
     
    4746    @Test
    4847    public void testTicket7714() throws IOException, XMLStreamException, FactoryConfigurationError {
    49         File file = new File(TestUtils.getRegressionDataFile(7714, "doc.kml"));
    50         try (InputStream is = new FileInputStream(file)) {
     48        try (InputStream is = TestUtils.getRegressionDataStream(7714, "doc.kml")) {
    5149            NonRegFunctionalTests.testGeneric("#7714", KmlReader.parseDataSet(is, null));
    5250        }
  • applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/tabular/CsvReaderTest.java

    r30573 r31990  
    6363    @Test
    6464    public void testTicket10214() throws IOException, XMLStreamException, FactoryConfigurationError {
    65         File file = new File(TestUtils.getRegressionDataFile(10214, "utf8_test.csv"));
    66         try (InputStream is = new FileInputStream(file)) {
     65        try (InputStream is = TestUtils.getRegressionDataStream(10214, "utf8_test.csv")) {
    6766            NonRegFunctionalTests.testTicket10214(CsvReader.parseDataSet(is, newHandler("EPSG:4326"), null));
    6867        }
     
    7574    @Test
    7675    public void testTicket8805() throws IOException, XMLStreamException, FactoryConfigurationError {
    77         File file = new File(TestUtils.getRegressionDataFile(8805, "XXX.csv"));
    78         try (InputStream is = new FileInputStream(file)) {
     76        try (InputStream is = TestUtils.getRegressionDataStream(8805, "XXX.csv")) {
    7977            NonRegFunctionalTests.testGeneric("#8805", CsvReader.parseDataSet(is, newHandler("EPSG:4326"), null));
    8078        }
Note: See TracChangeset for help on using the changeset viewer.