Ignore:
Timestamp:
2016-01-16T16:41:44+01:00 (6 years ago)
Author:
Don-vip
Message:

unit tests code refactoring/cleanup

Location:
trunk/test/unit/org/openstreetmap/josm/actions
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/actions/CombineWayActionTest.java

    r9225 r9489  
    44import static org.junit.Assert.assertEquals;
    55
    6 import java.io.FileInputStream;
    76import java.io.IOException;
    87import java.io.InputStream;
     
    109import java.util.List;
    1110import java.util.Set;
    12 
    13 import nl.jqno.equalsverifier.EqualsVerifier;
    1411
    1512import org.junit.BeforeClass;
     
    2320import org.openstreetmap.josm.io.IllegalDataException;
    2421import org.openstreetmap.josm.io.OsmReader;
     22
     23import nl.jqno.equalsverifier.EqualsVerifier;
    2524
    2625/**
     
    4443    @Test
    4544    public void testTicket11957() throws IOException, IllegalDataException {
    46         try (InputStream is = new FileInputStream(TestUtils.getRegressionDataFile(11957, "data.osm"))) {
     45        try (InputStream is = TestUtils.getRegressionDataStream(11957, "data.osm")) {
    4746            DataSet ds = OsmReader.parseDataSet(is, null);
    4847            NodeGraph graph = NodeGraph.createNearlyUndirectedGraphFromNodeWays(ds.getWays());
  • trunk/test/unit/org/openstreetmap/josm/actions/JoinAreasActionTest.java

    r8930 r9489  
    44import static org.junit.Assert.assertEquals;
    55
    6 import java.io.FileInputStream;
    76import java.io.IOException;
    87import java.io.InputStream;
     
    3938    @Test
    4039    public void testTicket10511() throws IOException, IllegalDataException {
    41         try (InputStream is = new FileInputStream(TestUtils.getRegressionDataFile(10511, "10511_mini.osm"))) {
     40        try (InputStream is = TestUtils.getRegressionDataStream(10511, "10511_mini.osm")) {
    4241            DataSet ds = OsmReader.parseDataSet(is, null);
    4342            Main.map.mapView.addLayer(new OsmDataLayer(ds, null, null));
     
    5453    @Test
    5554    public void testTicket11992() throws IOException, IllegalDataException {
    56         try (InputStream is = new FileInputStream(TestUtils.getRegressionDataFile(11992, "shapes.osm"))) {
     55        try (InputStream is = TestUtils.getRegressionDataStream(11992, "shapes.osm")) {
    5756            DataSet ds = OsmReader.parseDataSet(is, null);
    5857            assertEquals(10, ds.getWays().size());
  • trunk/test/unit/org/openstreetmap/josm/actions/PurgeActionTest.java

    r8984 r9489  
    55import static org.junit.Assert.assertTrue;
    66
    7 import java.io.FileInputStream;
    87import java.io.FileNotFoundException;
    98import java.io.IOException;
     
    4241    @Test
    4342    public void testCopyStringWayRelation() throws FileNotFoundException, IOException, IllegalDataException {
    44         try (InputStream is = new FileInputStream(TestUtils.getRegressionDataFile(12038, "data.osm"))) {
     43        try (InputStream is = TestUtils.getRegressionDataStream(12038, "data.osm")) {
    4544            DataSet ds = OsmReader.parseDataSet(is, null);
    4645            Main.map.mapView.addLayer(new OsmDataLayer(ds, null, null));
Note: See TracChangeset for help on using the changeset viewer.