Changeset 14446 in josm for trunk/test
- Timestamp:
- 2018-11-24T15:00:43+01:00 (6 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/layer/OsmDataLayerTest.java
r14349 r14446 221 221 " <tag k='time' v='2018-08-01T10:01:00Z' />\n" + 222 222 " </node>\n" + 223 " <way id='-546308'>\n" + 223 " <node id='-546308' timestamp='2018-08-01T10:02:00Z' lat='47.05' lon='9.05'>\n" + 224 " <tag k='ele' v='789' />\n" + 225 " </node>\n" + 226 " <way id='-546309'>\n" + 224 227 " <nd ref='-546306' />\n" + 225 228 " <nd ref='-546307' />\n" + 229 " <nd ref='-546308' />\n" + 226 230 " </way>\r\n" + 227 231 "</osm>").getBytes(StandardCharsets.UTF_8)), null)); … … 238 242 assertEquals(1, segments.size()); 239 243 Collection<WayPoint> trackpoints = segments.iterator().next().getWayPoints(); 240 assertEquals( 2, trackpoints.size());244 assertEquals(3, trackpoints.size()); 241 245 Iterator<WayPoint> it = trackpoints.iterator(); 242 246 DateFormat gpxFormat = DateUtils.getGpxFormat(); … … 249 253 assertEquals("456", p2.get(GpxConstants.PT_ELE)); 250 254 assertEquals("2018-08-01T10:01:00.000Z", gpxFormat.format(p2.get(GpxConstants.PT_TIME))); 255 WayPoint p3 = it.next(); 256 assertEquals(new LatLon(47.05, 9.05), p3.getCoor()); 257 assertEquals("789", p3.get(GpxConstants.PT_ELE)); 258 assertEquals("2018-08-01T10:02:00.000Z", gpxFormat.format(p3.get(GpxConstants.PT_TIME))); 251 259 } 252 260 -
trunk/test/unit/org/openstreetmap/josm/io/nmea/NmeaReaderTest.java
r14083 r14446 67 67 68 68 final List<WayPoint> wayPoints = new ArrayList<>(in.data.tracks.iterator().next().getSegments().iterator().next().getWayPoints()); 69 assertEquals( "2016-01-25T05:05:09.2Z", wayPoints.get(0).get(GpxConstants.PT_TIME));70 assertEquals( "2016-01-25T05:05:09.4Z", wayPoints.get(1).get(GpxConstants.PT_TIME));71 assertEquals( "2016-01-25T05:05:09.6Z", wayPoints.get(2).get(GpxConstants.PT_TIME));72 assertEquals(wayPoints.get(0).getTime(), DateUtils.fromString(wayPoints.get(0).get(GpxConstants.PT_TIME).toString()));69 assertEquals(DateUtils.fromString("2016-01-25T05:05:09.200Z"), wayPoints.get(0).get(GpxConstants.PT_TIME)); 70 assertEquals(DateUtils.fromString("2016-01-25T05:05:09.400Z"), wayPoints.get(1).get(GpxConstants.PT_TIME)); 71 assertEquals(DateUtils.fromString("2016-01-25T05:05:09.600Z"), wayPoints.get(2).get(GpxConstants.PT_TIME)); 72 assertEquals(wayPoints.get(0).getTime(), wayPoints.get(0).get(GpxConstants.PT_TIME)); 73 73 74 74 assertEquals("2016-01-25T05:05:09.200Z", iso8601.format(wayPoints.get(0).getTime()));
Note:
See TracChangeset
for help on using the changeset viewer.