1 19 25 26 package org.netbeans.modules.xml.core.wizard; 27 28 import java.io.*; 29 import java.net.URL ; 30 import java.util.*; 31 import junit.framework.*; 32 import org.netbeans.junit.*; 33 import org.xml.sax.*; 34 import org.xml.sax.ext.*; 35 import org.xml.sax.helpers.*; 36 import org.openide.xml.*; 37 import org.openide.util.Lookup; 38 import org.netbeans.modules.xml.core.tree.ModuleEntityResolver; 39 40 45 public class DTDParserTest extends NbTestCase { 46 47 public DTDParserTest(java.lang.String testName) { 48 super(testName); 49 } 50 51 public static void main(java.lang.String [] args) { 52 junit.textui.TestRunner.run(suite()); 53 } 54 55 public static Test suite() { 56 TestSuite suite = new NbTestSuite(DTDParserTest.class); 57 58 return suite; 59 } 60 61 62 public void testParse() { 63 URL dtd = getClass().getResource("data/dtd.dtd"); 64 InputSource in = new InputSource(dtd.toExternalForm()); 65 Set roots = new DTDParser().parse(in); 66 assertTrue("Expected decl not found!", roots.contains("root")); 67 } 68 69 } 70 | Popular Tags |