Changeset 8908 in josm for trunk/test/unit


Ignore:
Timestamp:
2015-10-19T16:55:23+02:00 (9 years ago)
Author:
Don-vip
Message:

improve download tasks unit tests

Location:
trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks
Files:
1 added
2 edited

Legend:

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

    r8904 r8908  
    33
    44import static org.junit.Assert.assertFalse;
     5import static org.junit.Assert.assertNotNull;
    56import static org.junit.Assert.assertTrue;
    67
     
    1011import org.junit.Test;
    1112import org.openstreetmap.josm.JOSMFixture;
     13import org.openstreetmap.josm.data.gpx.GpxData;
    1214
    1315/**
     
    5153        DownloadGpsTask task = new DownloadGpsTask();
    5254        task.loadUrl(false, REMOTE_FILE, null).get();
     55        GpxData data = task.getDownloadedData();
     56        assertNotNull(data);
     57        assertFalse(data.waypoints.isEmpty());
     58        assertFalse(data.tracks.isEmpty());
    5359    }
    5460}
  • trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTaskTest.java

    r8904 r8908  
    33
    44import static org.junit.Assert.assertFalse;
     5import static org.junit.Assert.assertNotNull;
    56import static org.junit.Assert.assertTrue;
    67
     
    1011import org.junit.Test;
    1112import org.openstreetmap.josm.JOSMFixture;
     13import org.openstreetmap.josm.data.osm.DataSet;
    1214
    1315/**
     
    5254        DownloadOsmTask task = new DownloadOsmTask();
    5355        task.loadUrl(false, REMOTE_FILE, null).get();
     56        DataSet ds = task.getDownloadedData();
     57        assertNotNull(ds);
     58        assertFalse(ds.getNodes().isEmpty());
     59        assertFalse(ds.getWays().isEmpty());
    5460    }
    5561}
Note: See TracChangeset for help on using the changeset viewer.