Search in sources :

Example 6 with BatikTestDocumentBuilderFactory

use of org.w3c.domts.BatikTestDocumentBuilderFactory 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.validation.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 7 with BatikTestDocumentBuilderFactory

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

the class TestBatik method suite.

public static TestSuite suite() throws Exception {
    Class testClass = ClassLoader.getSystemClassLoader().loadClass("org.w3c.domts.level2.events.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)

Aggregations

Constructor (java.lang.reflect.Constructor)7 BatikTestDocumentBuilderFactory (org.w3c.domts.BatikTestDocumentBuilderFactory)7 DOMTestDocumentBuilderFactory (org.w3c.domts.DOMTestDocumentBuilderFactory)7 JUnitTestSuiteAdapter (org.w3c.domts.JUnitTestSuiteAdapter)7