1 61 62 63 package org.jaxen.dom4j; 64 65 import junit.framework.Test; 66 import junit.framework.TestSuite; 67 import junit.textui.TestRunner; 68 69 import org.dom4j.io.SAXReader; 70 import org.jaxen.Navigator; 71 import org.jaxen.XPathTestBase; 72 73 public class DocumentNavigatorTest extends XPathTestBase 74 { 75 private SAXReader reader; 76 77 public DocumentNavigatorTest(String name) 78 { 79 super( name ); 80 81 this.reader = new SAXReader(); 82 83 this.reader.setMergeAdjacentText( true ); 84 } 85 86 public static void main(String [] args) 87 { 88 verbose = true; 89 if ( args.length > 0 ) 90 { 91 TESTS_XML = args[0]; 92 } 93 TestRunner.run( suite() ); 94 } 95 96 public static Test suite() 97 { 98 return new TestSuite( DocumentNavigatorTest.class ); 99 } 100 101 public Navigator getNavigator() 102 { 103 return new DocumentNavigator(); 104 } 105 106 public Object getDocument(String url) throws Exception 107 { 108 return reader.read( url ); 109 } 110 } 111 | Popular Tags |