1 /* 2 * Copyright (c) 2001-2004 World Wide Web Consortium, (Massachusetts Institute 3 * of Technology, Institut National de Recherche en Informatique et en 4 * Automatique, Keio University). All Rights Reserved. This program is 5 * distributed under the W3C's Software Intellectual Property License. This 6 * program is distributed in the hope that it will be useful, but WITHOUT ANY 7 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 8 * FOR A PARTICULAR PURPOSE. See W3C License 9 * http://www.w3.org/Consortium/Legal/ for more details. 10 */ 11 12 package org.w3c.domts.level2.core; 13 14 import java.lang.reflect.Constructor; 15 16 import junit.framework.TestSuite; 17 18 import org.w3c.domts.DOMTestDocumentBuilderFactory; 19 import org.w3c.domts.DOMTestSuite; 20 import org.w3c.domts.JAXPDOMTestDocumentBuilderFactory; 21 import org.w3c.domts.JUnitTestSuiteAdapter; 22 import org.w3c.domts.LSDocumentBuilderFactory; 23 24 /** 25 * Test suite that runs all DOM L2 Core tests using the 26 * Default LS parser in default configuration. 27 * 28 * @author Curt Arnold 29 * 30 */ 31 public class TestDefaultLS extends TestSuite { 32 33 public static TestSuite suite() throws Exception { 34 Class testClass = 35 ClassLoader.getSystemClassLoader().loadClass( 36 "org.w3c.domts.level2.core.alltests"); 37 Constructor testConstructor = 38 testClass.getConstructor( 39 new Class[] { DOMTestDocumentBuilderFactory.class }); 40 41 DOMTestDocumentBuilderFactory factory = 42 new LSDocumentBuilderFactory( 43 JAXPDOMTestDocumentBuilderFactory.getConfiguration1()); 44 45 Object test = testConstructor.newInstance(new Object[] { factory }); 46 47 return new JUnitTestSuiteAdapter((DOMTestSuite) test); 48 } 49 50 } 51