Search in sources :

Example 16 with DOMTestDocumentBuilderFactory

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

the class TestXalanAltConfig method suite.

public static TestSuite suite() throws Exception {
    Class testClass = ClassLoader.getSystemClassLoader().loadClass("org.w3c.domts.level3.xpath.alltests");
    Constructor testConstructor = testClass.getConstructor(new Class[] { DOMTestDocumentBuilderFactory.class });
    DocumentBuilderFactory jaxpFactory = DocumentBuilderFactory.newInstance();
    DOMTestDocumentBuilderFactory factory = new XalanDOMTestDocumentBuilderFactory(jaxpFactory, XalanDOMTestDocumentBuilderFactory.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) XalanDOMTestDocumentBuilderFactory(org.w3c.domts.XalanDOMTestDocumentBuilderFactory) XalanDOMTestDocumentBuilderFactory(org.w3c.domts.XalanDOMTestDocumentBuilderFactory) Constructor(java.lang.reflect.Constructor) JUnitTestSuiteAdapter(org.w3c.domts.JUnitTestSuiteAdapter) DOMTestDocumentBuilderFactory(org.w3c.domts.DOMTestDocumentBuilderFactory) XalanDOMTestDocumentBuilderFactory(org.w3c.domts.XalanDOMTestDocumentBuilderFactory)

Example 17 with DOMTestDocumentBuilderFactory

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

the class TestXercesHTML method suite.

public static TestSuite suite() throws Exception {
    Class testClass = ClassLoader.getSystemClassLoader().loadClass("org.w3c.domts.level2.html.alltests");
    Constructor testConstructor = testClass.getConstructor(new Class[] { DOMTestDocumentBuilderFactory.class });
    DOMTestDocumentBuilderFactory factory = new XercesHTML2DocumentBuilderFactory(XercesHTML2DocumentBuilderFactory.getConfiguration1());
    Object test = testConstructor.newInstance(new Object[] { factory });
    return new JUnitTestSuiteAdapter((DOMTestSuite) test);
}
Also used : XercesHTML2DocumentBuilderFactory(org.w3c.domts.XercesHTML2DocumentBuilderFactory) Constructor(java.lang.reflect.Constructor) JUnitTestSuiteAdapter(org.w3c.domts.JUnitTestSuiteAdapter) DOMTestDocumentBuilderFactory(org.w3c.domts.DOMTestDocumentBuilderFactory)

Example 18 with DOMTestDocumentBuilderFactory

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

the class TestBatik method suite.

/**
     * Factory method for suite.
     * 
     * @return suite
     * @throws Exception if Batik is not available or could not be instantiated
     */
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 BatikTestDocumentBuilderFactory(new DocumentBuilderSetting[0]);
    Object test = testConstructor.newInstance(new Object[] { factory });
    return new JUnitTestSuiteAdapter((DOMTestSuite) test);
}
Also used : BatikTestDocumentBuilderFactory(org.w3c.domts.BatikTestDocumentBuilderFactory) Constructor(java.lang.reflect.Constructor) JUnitTestSuiteAdapter(org.w3c.domts.JUnitTestSuiteAdapter) DOMTestDocumentBuilderFactory(org.w3c.domts.DOMTestDocumentBuilderFactory)

Example 19 with DOMTestDocumentBuilderFactory

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

the class TestDefaultLS method suite.

/**
     * Create instance of test suite.
     * 
     * @return test suite
     * @throws Exception if tests or implementation could not be loaded
     */
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 LSDocumentBuilderFactory(JAXPDOMTestDocumentBuilderFactory.getConfiguration1());
    Object test = testConstructor.newInstance(new Object[] { factory });
    return new JUnitTestSuiteAdapter((DOMTestSuite) test);
}
Also used : LSDocumentBuilderFactory(org.w3c.domts.LSDocumentBuilderFactory) Constructor(java.lang.reflect.Constructor) JUnitTestSuiteAdapter(org.w3c.domts.JUnitTestSuiteAdapter) DOMTestDocumentBuilderFactory(org.w3c.domts.DOMTestDocumentBuilderFactory) JAXPDOMTestDocumentBuilderFactory(org.w3c.domts.JAXPDOMTestDocumentBuilderFactory)

Example 20 with DOMTestDocumentBuilderFactory

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

the class TestDefaultLSAltConfig method suite.

/**
     * Create a new instance of the test suite
     * @return test suite
     * @throws Exception if tests or implementation not loaded
     */
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 LSDocumentBuilderFactory(JAXPDOMTestDocumentBuilderFactory.getConfiguration2());
    Object test = testConstructor.newInstance(new Object[] { factory });
    return new JUnitTestSuiteAdapter((DOMTestSuite) test);
}
Also used : LSDocumentBuilderFactory(org.w3c.domts.LSDocumentBuilderFactory) Constructor(java.lang.reflect.Constructor) JUnitTestSuiteAdapter(org.w3c.domts.JUnitTestSuiteAdapter) DOMTestDocumentBuilderFactory(org.w3c.domts.DOMTestDocumentBuilderFactory) JAXPDOMTestDocumentBuilderFactory(org.w3c.domts.JAXPDOMTestDocumentBuilderFactory)

Aggregations

DOMTestDocumentBuilderFactory (org.w3c.domts.DOMTestDocumentBuilderFactory)76 JUnitTestSuiteAdapter (org.w3c.domts.JUnitTestSuiteAdapter)75 Constructor (java.lang.reflect.Constructor)73 JAXPDOMTestDocumentBuilderFactory (org.w3c.domts.JAXPDOMTestDocumentBuilderFactory)60 DocumentBuilderFactory (javax.xml.parsers.DocumentBuilderFactory)31 LSDocumentBuilderFactory (org.w3c.domts.LSDocumentBuilderFactory)17 BatikTestDocumentBuilderFactory (org.w3c.domts.BatikTestDocumentBuilderFactory)7 TestSuite (junit.framework.TestSuite)2 DOM4JTestDocumentBuilderFactory (org.w3c.domts.DOM4JTestDocumentBuilderFactory)2 DOMTestSuite (org.w3c.domts.DOMTestSuite)2 JTidyDocumentBuilderFactory (org.w3c.domts.JTidyDocumentBuilderFactory)2 XalanDOMTestDocumentBuilderFactory (org.w3c.domts.XalanDOMTestDocumentBuilderFactory)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 XMLConstants (javax.xml.XMLConstants)1 DOMImplementation (org.apache.axiom.ts.jaxp.DOMImplementation)1 XSLTImplementation (org.apache.axiom.ts.jaxp.XSLTImplementation)1 XMLSample (org.apache.axiom.ts.xml.XMLSample)1 DOMTestIncompatibleException (org.w3c.domts.DOMTestIncompatibleException)1 DocumentBuilderSetting (org.w3c.domts.DocumentBuilderSetting)1 XercesHTML2DocumentBuilderFactory (org.w3c.domts.XercesHTML2DocumentBuilderFactory)1