Ignore:
Timestamp:
2016-12-12T17:29:27+01:00 (7 years ago)
Author:
Don-vip
Message:

findbugs - BC_UNCONFIRMED_CAST

Location:
trunk/test/unit/org/openstreetmap/josm/data/osm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/osm/NodeTest.java

    r11269 r11383  
    8080        assertEquals(box1.getCenter(), new LatLon(15, 15));
    8181    }
     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    }
    82106}
  • trunk/test/unit/org/openstreetmap/josm/data/osm/RelationTest.java

    r11269 r11383  
    139139        assertEquals(OsmPrimitiveType.RELATION, r.getDisplayType());
    140140    }
     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    }
    141157}
  • trunk/test/unit/org/openstreetmap/josm/data/osm/WayTest.java

    r11271 r11383  
    5555        assertEquals(way.getBBox(), new BBox(10, 10));
    5656    }
     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    }
    5773}
Note: See TracChangeset for help on using the changeset viewer.