KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > xs > junit > DTDParserTest


1 package org.apache.ws.jaxme.xs.junit;
2
3 import java.io.File JavaDoc;
4 import java.io.FileReader JavaDoc;
5
6 import org.apache.ws.jaxme.xs.util.DTDParser;
7 import org.xml.sax.InputSource JavaDoc;
8
9 import junit.framework.TestCase;
10
11
12 /** A unit test for the
13  * {@link org.apache.ws.jaxme.xs.util.DTDParser}.
14  */

15 public class DTDParserTest extends TestCase {
16     /** Creates a new test case with the given name.
17      */

18     public DTDParserTest(String JavaDoc pName) { super(pName); }
19
20     /** Parses the file XMLSchema.dtd.
21      */

22     public void testXMLSchemaDtd() throws Exception JavaDoc {
23         String JavaDoc path = System.getProperty("path.xmlSchema.dtd", "examples/xs/XMLSchema.dtd");
24         File JavaDoc f = new File JavaDoc(path);
25         InputSource JavaDoc isource = new InputSource JavaDoc(new FileReader JavaDoc(f));
26         isource.setSystemId(f.toURL().toString());
27         new DTDParser().parse(isource);
28     }
29 }
30
Popular Tags