Changeset 9380 in josm for trunk


Ignore:
Timestamp:
2016-01-10T02:54:19+01:00 (9 years ago)
Author:
Don-vip
Message:

fix unit test, remove dependence on Ant runtime

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/io/GpxReaderTest.java

    r9378 r9380  
    55import static org.junit.Assert.assertTrue;
    66
     7import java.io.ByteArrayInputStream;
    78import java.io.File;
    89import java.io.FileInputStream;
     10import java.nio.charset.StandardCharsets;
    911import java.util.List;
    1012
    11 import org.apache.tools.ant.filters.StringInputStream;
    1213import org.junit.Test;
    1314import org.openstreetmap.josm.data.coor.LatLon;
     
    4243    }
    4344
     45    /**
     46     * Tests invalid data.
     47     * @throws Exception always SAXException
     48     */
    4449    @Test(expected = SAXException.class)
    4550    public void testException() throws Exception {
    46         new GpxReader(new StringInputStream("--foo--bar--")).parse(true);
     51        new GpxReader(new ByteArrayInputStream("--foo--bar--".getBytes(StandardCharsets.UTF_8))).parse(true);
    4752    }
    4853}
Note: See TracChangeset for help on using the changeset viewer.