src/test/java/de/blau/android/osm/StorageTest.java
/**
     * Test that changing an id and rehashing works
     */
Test that changing an id and rehashing works
Test that changing an id and rehashing works
@Test
    public void rehash() {
        Node node = (Node) storage.getOsmElement(Node.NAME, 300852915L);
        assertNotNull(node);
        node.setOsmId(-12345);
        assertNull(storage.getOsmElement(Node.NAME, -12345L));
        storage.rehash();
        Node changed = (Node) storage.getOsmElement(Node.NAME, -12345L);
        assertNotNull(changed);
        assertEquals(node, changed);
    }
@ Test public void rehash ( ) { Node node = ( Node ) storage . getOsmElement ( Node . NAME , 300852915L ) ; assertNotNull ( node ) ; node . setOsmId ( - 12345 ) ; assertNull ( storage . getOsmElement ( Node . NAME , - 12345L ) ) ; storage . rehash ( ) ; Node changed = ( Node ) storage . getOsmElement ( Node . NAME , - 12345L ) ; assertNotNull ( changed ) ; assertEquals ( node , changed ) ; }
Test that changing an id and rehashing works
Test that changing an id and rehashing works