1 8 9 package test.dom4j.io; 10 11 import junit.framework.Test; 12 import junit.framework.TestSuite; 13 import junit.textui.TestRunner; 14 import org.ozoneDB.xml.dom4j.io.O3SAXReader; 15 import test.dom4j.AbstractTestCase; 16 17 import java.io.File ; 18 import java.net.URL ; 19 20 24 public class TestSAXReader extends AbstractTestCase { 25 26 public static void main( String [] args ) { 27 TestRunner.run( suite() ); 28 } 29 30 public static Test suite() { 31 return new TestSuite( TestSAXReader.class ); 32 } 33 34 public TestSAXReader(String name) { 35 super(name); 36 } 37 38 44 public void testReadFile() { 45 try { 46 URL location = TestSAXReader.class.getResource("/#.xml"); 47 File file = new File (location.getPath() + "/#.xml"); 48 new O3SAXReader(db()).read(file); 49 } catch (Exception e) { 50 e.printStackTrace(); 51 fail(e.getMessage()); 52 } 53 } 54 55 } 56 57 58 59 60 104 | Popular Tags |