assertEquals("i", tw.nextNode().getLocalName());
assertEquals(null, tw.nextNode());
}
public void testPreviousNode() throws Exception {
TreeWalker tw = new TreeWalkerImpl(dom, NodeFilter.SHOW_ALL, null, false);
tw.setCurrentNode(dom.getLastChild());
assertEquals("i", tw.getCurrentNode().getLocalName());
assertEquals("h", tw.previousNode().getLocalName());
assertEquals("g", tw.previousNode().getLocalName());
assertEquals("f", tw.previousNode().getLocalName());
assertEquals("e", tw.previousNode().getLocalName());
assertEquals("d", tw.previousNode().getLocalName());
assertEquals("c", tw.previousNode().getLocalName());
assertEquals("b", tw.previousNode().getLocalName());
assertEquals("a", tw.previousNode().getLocalName());
assertEquals(null, tw.previousNode());
}