src/test/java/de/blau/android/osm/StorageDelegatorTest.java
/**
     * Test removeNodeFromWay closes Way is closing Node is removed
     */
Test removeNodeFromWay closes Way is closing Node is removed
Test removeNodeFromWay closes Way is closing Node is removed
@Test
    public void removeNodeFromWay() {
        StorageDelegator d = new StorageDelegator();
        Way w = DelegatorUtil.addWayToStorage(d, true);
        Way temp = (Way) d.getOsmElement(Way.NAME, w.getOsmId());
        assertNotNull(temp);
        assertTrue(w.isClosed());
        Node lastNode = w.getLastNode();
        assertEquals(2, w.count(lastNode));
        d.removeNodeFromWay(w, lastNode);
        assertNotNull(d.getApiStorage().getWay(w.getOsmId()));
        assertFalse(w.hasNode(lastNode));
        assertTrue(w.isClosed());
    }
@ Test public void removeNodeFromWay ( ) { StorageDelegator d = new StorageDelegator ( ) ; Way w = DelegatorUtil . addWayToStorage ( d , true ) ; Way temp = ( Way ) d . getOsmElement ( Way . NAME , w . getOsmId ( ) ) ; assertNotNull ( temp ) ; assertTrue ( w . isClosed ( ) ) ; Node lastNode = w . getLastNode ( ) ; assertEquals ( 2 , w . count ( lastNode ) ) ; d . removeNodeFromWay ( w , lastNode ) ; assertNotNull ( d . getApiStorage ( ) . getWay ( w . getOsmId ( ) ) ) ; assertFalse ( w . hasNode ( lastNode ) ) ; assertTrue ( w . isClosed ( ) ) ; }
Test removeNodeFromWay closes Way is closing Node is removed
Test removeNodeFromWay closes Way is closing Node is removed