Home | History | Annotate | Download | only in core
      1 /*
      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
      9  * PURPOSE.
     10  * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
     11  */
     12 
     13 
     14 package org.w3c.domts.level1.core;
     15 
     16 import java.lang.reflect.Constructor;
     17 
     18 import junit.framework.TestSuite;
     19 
     20 import org.w3c.domts.DOMTestDocumentBuilderFactory;
     21 import org.w3c.domts.DOMTestSuite;
     22 import org.w3c.domts.JAXPDOMTestDocumentBuilderFactory;
     23 import org.w3c.domts.JUnitTestSuiteAdapter;
     24 
     25 public class TestDefaultParserAltConfig extends TestSuite {
     26 
     27   public static TestSuite suite() throws Exception
     28   {
     29     Class testClass = ClassLoader.getSystemClassLoader().loadClass("org.w3c.domts.level1.core.alltests");
     30     Constructor testConstructor = testClass.getConstructor(new Class[] { DOMTestDocumentBuilderFactory.class });
     31 
     32     DOMTestDocumentBuilderFactory factory =
     33         new JAXPDOMTestDocumentBuilderFactory(null,
     34           JAXPDOMTestDocumentBuilderFactory.getConfiguration2());
     35 
     36     Object test = testConstructor.newInstance(new Object[] { factory });
     37 
     38     return new JUnitTestSuiteAdapter((DOMTestSuite) test);
     39   }
     40 
     41 
     42 }
     43 
     44