1 61 62 63 package org.jaxen.dom4j; 64 65 import junit.framework.Test; 66 import junit.framework.TestCase; 67 import junit.framework.TestSuite; 68 import org.jaxen.Navigator; 69 import org.jaxen.FunctionCallException; 70 import org.jaxen.UnsupportedAxisException; 71 72 import java.util.Iterator ; 73 74 83 public class DOM4JTests extends TestCase { 84 85 86 public DOM4JTests(String name) { 87 super(name); 88 } 89 90 91 public static Test suite() { 92 93 TestSuite result = new TestSuite(); 94 result.addTest(new TestSuite(DocumentNavigatorTest.class)); 95 result.addTest(new TestSuite(XPathTest.class)); 96 return result; 97 98 } 99 100 105 public void testConcurrentModification() throws FunctionCallException, UnsupportedAxisException 106 { 107 Navigator nav = new DocumentNavigator(); 108 Object document = nav.getDocument("xml/testNamespaces.xml"); 109 Iterator descendantOrSelfAxisIterator = nav.getDescendantOrSelfAxisIterator(document); 110 while (descendantOrSelfAxisIterator.hasNext()) { 111 Object node = descendantOrSelfAxisIterator.next(); 112 Iterator namespaceAxisIterator = nav.getNamespaceAxisIterator(node); 113 while (namespaceAxisIterator.hasNext()) { 114 namespaceAxisIterator.next(); 115 } 116 } 117 } 118 119 120 } | Popular Tags |