Changeset 14797 in josm for trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxImageCorrelationTest.java
- Timestamp:
- 2019-02-22T22:35:25+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxImageCorrelationTest.java
r14205 r14797 4 4 import static org.junit.Assert.assertEquals; 5 5 import static org.junit.Assert.assertFalse; 6 import static org.junit.Assert.assertNull; 6 7 import static org.junit.Assert.assertTrue; 7 8 … … 14 15 import org.openstreetmap.josm.TestUtils; 15 16 import org.openstreetmap.josm.data.coor.CachedLatLon; 17 import org.openstreetmap.josm.data.coor.LatLon; 16 18 import org.openstreetmap.josm.io.GpxReaderTest; 17 19 import org.openstreetmap.josm.spi.preferences.Config; … … 267 269 } 268 270 } 271 272 /** 273 * Unit test of {@link GpxImageCorrelation#getElevation} 274 */ 275 @Test 276 public void testGetElevation() { 277 assertNull(GpxImageCorrelation.getElevation(null)); 278 WayPoint wp = new WayPoint(LatLon.ZERO); 279 assertNull(GpxImageCorrelation.getElevation(wp)); 280 wp.put(GpxConstants.PT_ELE, ""); 281 assertNull(GpxImageCorrelation.getElevation(wp)); 282 wp.put(GpxConstants.PT_ELE, "not a number"); 283 assertNull(GpxImageCorrelation.getElevation(wp)); 284 wp.put(GpxConstants.PT_ELE, "150.0"); 285 assertEquals(Double.valueOf(150.0d), GpxImageCorrelation.getElevation(wp)); 286 } 269 287 }
Note:
See TracChangeset
for help on using the changeset viewer.