Search in sources :

Example 11 with JAXPDOMTestDocumentBuilderFactory

use of org.w3c.domts.JAXPDOMTestDocumentBuilderFactory in project robovm by robovm.

the class TestDefaultParser method suite.

/**
    * Create a new instance of the test suite
    * @return new test suite
    * @exception Exception if tests or implementation can be created. 
    */
public static TestSuite suite() throws Exception {
    Class testClass = ClassLoader.getSystemClassLoader().loadClass("org.w3c.domts.level3.core.alltests");
    Constructor testConstructor = testClass.getConstructor(new Class[] { DOMTestDocumentBuilderFactory.class });
    DOMTestDocumentBuilderFactory factory = new JAXPDOMTestDocumentBuilderFactory(null, JAXPDOMTestDocumentBuilderFactory.getConfiguration1());
    Object test = testConstructor.newInstance(new Object[] { factory });
    return new JUnitTestSuiteAdapter((DOMTestSuite) test);
}
Also used : Constructor(java.lang.reflect.Constructor) JUnitTestSuiteAdapter(org.w3c.domts.JUnitTestSuiteAdapter) JAXPDOMTestDocumentBuilderFactory(org.w3c.domts.JAXPDOMTestDocumentBuilderFactory) DOMTestDocumentBuilderFactory(org.w3c.domts.DOMTestDocumentBuilderFactory) JAXPDOMTestDocumentBuilderFactory(org.w3c.domts.JAXPDOMTestDocumentBuilderFactory)

Example 12 with JAXPDOMTestDocumentBuilderFactory

use of org.w3c.domts.JAXPDOMTestDocumentBuilderFactory in project robovm by robovm.

the class TestOracleAltConfig method suite.

/**
	 * Constructor
	 * @return test suite
	 * @throws Exception
	 */
public static TestSuite suite() throws Exception {
    Class testClass = ClassLoader.getSystemClassLoader().loadClass("org.w3c.domts.level3.core.alltests");
    Constructor testConstructor = testClass.getConstructor(new Class[] { DOMTestDocumentBuilderFactory.class });
    DocumentBuilderFactory oracleFactory = (DocumentBuilderFactory) ClassLoader.getSystemClassLoader().loadClass("oracle.xml.jaxp.JXDocumentBuilderFactory").newInstance();
    DOMTestDocumentBuilderFactory factory = new JAXPDOMTestDocumentBuilderFactory(oracleFactory, JAXPDOMTestDocumentBuilderFactory.getConfiguration2());
    Object test = testConstructor.newInstance(new Object[] { factory });
    return new JUnitTestSuiteAdapter((DOMTestSuite) test);
}
Also used : DOMTestDocumentBuilderFactory(org.w3c.domts.DOMTestDocumentBuilderFactory) DocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory) JAXPDOMTestDocumentBuilderFactory(org.w3c.domts.JAXPDOMTestDocumentBuilderFactory) Constructor(java.lang.reflect.Constructor) JUnitTestSuiteAdapter(org.w3c.domts.JUnitTestSuiteAdapter) JAXPDOMTestDocumentBuilderFactory(org.w3c.domts.JAXPDOMTestDocumentBuilderFactory) DOMTestDocumentBuilderFactory(org.w3c.domts.DOMTestDocumentBuilderFactory) JAXPDOMTestDocumentBuilderFactory(org.w3c.domts.JAXPDOMTestDocumentBuilderFactory)

Example 13 with JAXPDOMTestDocumentBuilderFactory

use of org.w3c.domts.JAXPDOMTestDocumentBuilderFactory in project robovm by robovm.

the class TestXerces method suite.

public static TestSuite suite() throws Exception {
    Class testClass = ClassLoader.getSystemClassLoader().loadClass("org.w3c.domts.level3.core.alltests");
    Constructor testConstructor = testClass.getConstructor(new Class[] { DOMTestDocumentBuilderFactory.class });
    DocumentBuilderFactory xercesFactory = (DocumentBuilderFactory) ClassLoader.getSystemClassLoader().loadClass("org.apache.xerces.jaxp.DocumentBuilderFactoryImpl").newInstance();
    DOMTestDocumentBuilderFactory factory = new JAXPDOMTestDocumentBuilderFactory(xercesFactory, JAXPDOMTestDocumentBuilderFactory.getConfiguration1());
    Object test = testConstructor.newInstance(new Object[] { factory });
    return new JUnitTestSuiteAdapter((DOMTestSuite) test);
}
Also used : DOMTestDocumentBuilderFactory(org.w3c.domts.DOMTestDocumentBuilderFactory) DocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory) JAXPDOMTestDocumentBuilderFactory(org.w3c.domts.JAXPDOMTestDocumentBuilderFactory) Constructor(java.lang.reflect.Constructor) JUnitTestSuiteAdapter(org.w3c.domts.JUnitTestSuiteAdapter) JAXPDOMTestDocumentBuilderFactory(org.w3c.domts.JAXPDOMTestDocumentBuilderFactory) DOMTestDocumentBuilderFactory(org.w3c.domts.DOMTestDocumentBuilderFactory) JAXPDOMTestDocumentBuilderFactory(org.w3c.domts.JAXPDOMTestDocumentBuilderFactory)

Example 14 with JAXPDOMTestDocumentBuilderFactory

use of org.w3c.domts.JAXPDOMTestDocumentBuilderFactory in project robovm by robovm.

the class TestOracle method suite.

/**
	 * Constructs the test suite
	 * 
	 * @return test suite
	 * @throws Exception can throw class load exceptions
	 * if class path does not contain dom3-ls.jar or 
	 * xmlparserv2.jar
	 */
public static TestSuite suite() throws Exception {
    Class testClass = ClassLoader.getSystemClassLoader().loadClass("org.w3c.domts.level3.ls.alltests");
    Constructor testConstructor = testClass.getConstructor(new Class[] { DOMTestDocumentBuilderFactory.class });
    DocumentBuilderFactory jxFactory = (DocumentBuilderFactory) ClassLoader.getSystemClassLoader().loadClass("oracle.xml.jaxp.JXDocumentBuilderFactory").newInstance();
    DOMTestDocumentBuilderFactory factory = new JAXPDOMTestDocumentBuilderFactory(jxFactory, JAXPDOMTestDocumentBuilderFactory.getConfiguration1());
    Object test = testConstructor.newInstance(new Object[] { factory });
    return new JUnitTestSuiteAdapter((DOMTestSuite) test);
}
Also used : DOMTestDocumentBuilderFactory(org.w3c.domts.DOMTestDocumentBuilderFactory) DocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory) JAXPDOMTestDocumentBuilderFactory(org.w3c.domts.JAXPDOMTestDocumentBuilderFactory) Constructor(java.lang.reflect.Constructor) JUnitTestSuiteAdapter(org.w3c.domts.JUnitTestSuiteAdapter) JAXPDOMTestDocumentBuilderFactory(org.w3c.domts.JAXPDOMTestDocumentBuilderFactory) DOMTestDocumentBuilderFactory(org.w3c.domts.DOMTestDocumentBuilderFactory) JAXPDOMTestDocumentBuilderFactory(org.w3c.domts.JAXPDOMTestDocumentBuilderFactory)

Example 15 with JAXPDOMTestDocumentBuilderFactory

use of org.w3c.domts.JAXPDOMTestDocumentBuilderFactory in project robovm by robovm.

the class TestXerces method suite.

public static TestSuite suite() throws Exception {
    Class testClass = ClassLoader.getSystemClassLoader().loadClass("org.w3c.domts.level3.ls.alltests");
    Constructor testConstructor = testClass.getConstructor(new Class[] { DOMTestDocumentBuilderFactory.class });
    DocumentBuilderFactory xercesFactory = (DocumentBuilderFactory) ClassLoader.getSystemClassLoader().loadClass("org.apache.xerces.jaxp.DocumentBuilderFactoryImpl").newInstance();
    DOMTestDocumentBuilderFactory factory = new JAXPDOMTestDocumentBuilderFactory(xercesFactory, JAXPDOMTestDocumentBuilderFactory.getConfiguration1());
    Object test = testConstructor.newInstance(new Object[] { factory });
    return new JUnitTestSuiteAdapter((DOMTestSuite) test);
}
Also used : DOMTestDocumentBuilderFactory(org.w3c.domts.DOMTestDocumentBuilderFactory) DocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory) JAXPDOMTestDocumentBuilderFactory(org.w3c.domts.JAXPDOMTestDocumentBuilderFactory) Constructor(java.lang.reflect.Constructor) JUnitTestSuiteAdapter(org.w3c.domts.JUnitTestSuiteAdapter) JAXPDOMTestDocumentBuilderFactory(org.w3c.domts.JAXPDOMTestDocumentBuilderFactory) DOMTestDocumentBuilderFactory(org.w3c.domts.DOMTestDocumentBuilderFactory) JAXPDOMTestDocumentBuilderFactory(org.w3c.domts.JAXPDOMTestDocumentBuilderFactory)

Aggregations

DOMTestDocumentBuilderFactory (org.w3c.domts.DOMTestDocumentBuilderFactory)43 JAXPDOMTestDocumentBuilderFactory (org.w3c.domts.JAXPDOMTestDocumentBuilderFactory)43 JUnitTestSuiteAdapter (org.w3c.domts.JUnitTestSuiteAdapter)43 Constructor (java.lang.reflect.Constructor)41 DocumentBuilderFactory (javax.xml.parsers.DocumentBuilderFactory)28 TestSuite (junit.framework.TestSuite)2 DOMTestSuite (org.w3c.domts.DOMTestSuite)2