2 * Copyright (c) 2001-2004 World Wide Web Consortium,
3 * (Massachusetts Institute of Technology, Institut National de
4 * Recherche en Informatique et en Automatique, Keio University). All
5 * Rights Reserved. This program is distributed under the W3C's Software
6 * Intellectual Property License. This program is distributed in the
7 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10 * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
14 package org.w3c.domts.level2.core;
16 import java.lang.reflect.Constructor;
18 import javax.xml.parsers.DocumentBuilderFactory;
20 import junit.framework.TestSuite;
22 import org.w3c.domts.DOMTestDocumentBuilderFactory;
23 import org.w3c.domts.DOMTestSuite;
24 import org.w3c.domts.JAXPDOMTestDocumentBuilderFactory;
25 import org.w3c.domts.JUnitTestSuiteAdapter;
27 public class TestCrimson extends TestSuite {
29 public static TestSuite suite() throws Exception
31 Class testClass = ClassLoader.getSystemClassLoader().loadClass("org.w3c.domts.level2.core.alltests");
32 Constructor testConstructor = testClass.getConstructor(new Class[] { DOMTestDocumentBuilderFactory.class });
34 DocumentBuilderFactory crimsonFactory = (DocumentBuilderFactory)
35 ClassLoader.getSystemClassLoader().loadClass("org.apache.crimson.jaxp.DocumentBuilderFactoryImpl").newInstance();
37 DOMTestDocumentBuilderFactory factory =
38 new JAXPDOMTestDocumentBuilderFactory(crimsonFactory,
39 JAXPDOMTestDocumentBuilderFactory.getConfiguration1());
41 Object test = testConstructor.newInstance(new Object[] { factory });
43 return new JUnitTestSuiteAdapter((DOMTestSuite) test);