Changeset 12156 in josm for trunk/test/unit/org
- Timestamp:
- 2017-05-15T14:14:40+02:00 (8 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelperTest.java
r11713 r12156 6 6 import java.io.FileNotFoundException; 7 7 import java.io.IOException; 8 import java.util.ArrayList;9 import java.util.Iterator;10 8 import java.util.List; 9 import java.util.stream.Collectors; 11 10 12 11 import org.junit.BeforeClass; … … 16 15 import org.openstreetmap.josm.TestUtils; 17 16 import org.openstreetmap.josm.data.gpx.GpxData; 18 import org.openstreetmap.josm.data.gpx.WayPoint;19 17 import org.openstreetmap.josm.io.GpxReaderTest; 20 18 import org.openstreetmap.josm.tools.ColorHelper; … … 128 126 gdh.readPreferences(layerName); 129 127 gdh.calculateColors(); 130 final Iterator<WayPoint> wayPointIterator = data.tracks.iterator().next().getSegments().iterator().next().getWayPoints().iterator(); 131 final List<String> colorCodes = new ArrayList<>(n); 132 while (colorCodes.size() < n) { 133 colorCodes.add(ColorHelper.color2html(wayPointIterator.next().customColoring)); 134 } 135 return colorCodes; 128 return data.getTrackPoints().limit(n).map(p -> ColorHelper.color2html(p.customColoring)).collect(Collectors.toList()); 136 129 } 137 130 } -
trunk/test/unit/org/openstreetmap/josm/io/GpxReaderTest.java
r10733 r12156 47 47 public void testMunich() throws Exception { 48 48 final GpxData result = parseGpxData("data_nodist/munich.gpx"); 49 assertEquals(2762, result. tracks.size());50 assertEquals(0, result. routes.size());51 assertEquals(903, result. waypoints.size());49 assertEquals(2762, result.getTracks().size()); 50 assertEquals(0, result.getRoutes().size()); 51 assertEquals(903, result.getWaypoints().size()); 52 52 53 53 final WayPoint tenthWayPoint = ((List<WayPoint>) result.waypoints).get(10);
Note:
See TracChangeset
for help on using the changeset viewer.