1 9 10 package test.dom4j; 11 12 import junit.framework.Test; 13 import junit.framework.TestSuite; 14 import junit.textui.TestRunner; 15 import org.dom4j.Document; 16 import org.dom4j.io.SAXReader; 17 18 23 public class TestValidation extends AbstractTestCase { 24 25 public static void main( String [] args ) { 26 TestRunner.run( suite() ); 27 } 28 29 public static Test suite() { 30 return new TestSuite( TestValidation.class ); 31 } 32 33 public TestValidation(String name) { 34 super(name); 35 } 36 37 public void testValidation() throws Exception { 40 SAXReader reader = new SAXReader( true ); 41 Document document = reader.read( "xml/nitf/valid.xml" ); 42 assertTrue( "Found valid document", document != null ); 43 44 log( "Validated document: " + document ); 45 } 46 } 47 48 49 50 51 95 | Popular Tags |