01: package org.objectweb.celtix.tools.common.dom;
02:
03: import org.w3c.dom.Document;
04:
05: import junit.framework.TestCase;
06:
07: public class ExtendedDocumentBuilderTest extends TestCase {
08: public void testMassMethod() throws Exception {
09: ExtendedDocumentBuilder builder = new ExtendedDocumentBuilder();
10: builder.setValidating(false);
11: String tsSource = "/org/objectweb/celtix/tools/common/toolspec/parser/resources/testtool.xml";
12: assertTrue(builder.parse(getClass().getResourceAsStream(
13: tsSource)) != null);
14: }
15:
16: public void testParse() throws Exception {
17: ExtendedDocumentBuilder builder = new ExtendedDocumentBuilder();
18: String tsSource = "/org/objectweb/celtix/tools/common/toolspec/parser/resources/testtool1.xml";
19: Document doc = builder.parse(getClass().getResourceAsStream(
20: tsSource));
21: assertEquals(doc.getXmlVersion(), "1.0");
22: }
23: }
|