Changeset 11383 in josm for trunk/test/unit
- Timestamp:
- 2016-12-12T17:29:27+01:00 (8 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/osm/NodeTest.java
r11269 r11383 80 80 assertEquals(box1.getCenter(), new LatLon(15, 15)); 81 81 } 82 83 /** 84 * Test that {@link Node#cloneFrom} throws IAE for invalid arguments 85 */ 86 @Test(expected = IllegalArgumentException.class) 87 public void testCloneFromIAE() { 88 new Node().cloneFrom(new Way()); 89 } 90 91 /** 92 * Test that {@link Node#mergeFrom} throws IAE for invalid arguments 93 */ 94 @Test(expected = IllegalArgumentException.class) 95 public void testMergeFromIAE() { 96 new Node().mergeFrom(new Way()); 97 } 98 99 /** 100 * Test that {@link Node#load} throws IAE for invalid arguments 101 */ 102 @Test(expected = IllegalArgumentException.class) 103 public void testLoadIAE() { 104 new Node().load(new WayData()); 105 } 82 106 } -
trunk/test/unit/org/openstreetmap/josm/data/osm/RelationTest.java
r11269 r11383 139 139 assertEquals(OsmPrimitiveType.RELATION, r.getDisplayType()); 140 140 } 141 142 /** 143 * Test that {@link Relation#cloneFrom} throws IAE for invalid arguments 144 */ 145 @Test(expected = IllegalArgumentException.class) 146 public void testCloneFromIAE() { 147 new Relation().cloneFrom(new Node()); 148 } 149 150 /** 151 * Test that {@link Relation#load} throws IAE for invalid arguments 152 */ 153 @Test(expected = IllegalArgumentException.class) 154 public void testLoadIAE() { 155 new Relation().load(new NodeData()); 156 } 141 157 } -
trunk/test/unit/org/openstreetmap/josm/data/osm/WayTest.java
r11271 r11383 55 55 assertEquals(way.getBBox(), new BBox(10, 10)); 56 56 } 57 58 /** 59 * Test that {@link Way#cloneFrom} throws IAE for invalid arguments 60 */ 61 @Test(expected = IllegalArgumentException.class) 62 public void testCloneFromIAE() { 63 new Way().cloneFrom(new Node()); 64 } 65 66 /** 67 * Test that {@link Way#load} throws IAE for invalid arguments 68 */ 69 @Test(expected = IllegalArgumentException.class) 70 public void testLoadIAE() { 71 new Way().load(new NodeData()); 72 } 57 73 } -
trunk/test/unit/org/openstreetmap/josm/gui/layer/GpxLayerTest.java
r11071 r11383 23 23 import org.openstreetmap.josm.data.gpx.ImmutableGpxTrack; 24 24 import org.openstreetmap.josm.data.gpx.WayPoint; 25 import org.openstreetmap.josm.data.osm.DataSet; 25 26 import org.openstreetmap.josm.data.projection.Projections; 26 27 import org.openstreetmap.josm.gui.widgets.HtmlPanel; … … 192 193 193 194 /** 195 * Test that {@link GpxLayer#mergeFrom} throws IAE for invalid arguments 196 */ 197 @Test(expected = IllegalArgumentException.class) 198 public void testMergeFromIAE() { 199 new GpxLayer(new GpxData()).mergeFrom(new OsmDataLayer(new DataSet(), "", null)); 200 } 201 202 /** 194 203 * Unit test of {@link GpxLayer#paint}. 195 204 * @throws Exception if any error occurs -
trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayerTest.java
r10467 r11383 14 14 import org.openstreetmap.josm.Main; 15 15 import org.openstreetmap.josm.TestUtils; 16 import org.openstreetmap.josm.data.osm.DataSet; 16 17 import org.openstreetmap.josm.gui.layer.GpxLayer; 18 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 17 19 import org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer.Loader; 18 20 import org.openstreetmap.josm.io.GpxReader; … … 57 59 } 58 60 } 61 62 /** 63 * Test that {@link GeoImageLayer#mergeFrom} throws IAE for invalid arguments 64 */ 65 @Test(expected = IllegalArgumentException.class) 66 public void testMergeFromIAE() { 67 new GeoImageLayer(null, null).mergeFrom(new OsmDataLayer(new DataSet(), "", null)); 68 } 59 69 }
Note:
See TracChangeset
for help on using the changeset viewer.