Search in sources :

Example 1 with JUnitTestSuiteAdapter

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

the class AllTests_Level2 method suite.

/*public static void run() {
        TestRunner.main(new String[] {Main_AllTests.class.getName()});
    }*/
public static final Test suite() {
    // from http://www.w3.org/DOM/Test/
    // Level 2 Core tests
    DOMTestSuite domSuite;
    try {
        DOMTestDocumentBuilderFactory factory1 = new JAXPDOMTestDocumentBuilderFactory(null, JAXPDOMTestDocumentBuilderFactory.getConfiguration1());
        // android: coalescing, epand, ignorewhitespace, namespace, NOT validation
        domSuite = new org.w3c.domts.level2.core.alltests(factory1);
    } catch (Exception e) {
        throw new RuntimeException("problem creating dom test suite", e);
    }
    TestSuite suite = new JUnitTestSuiteAdapter(domSuite);
    return suite;
}
Also used : TestSuite(junit.framework.TestSuite) DOMTestSuite(org.w3c.domts.DOMTestSuite) JUnitTestSuiteAdapter(org.w3c.domts.JUnitTestSuiteAdapter) DOMTestSuite(org.w3c.domts.DOMTestSuite) JAXPDOMTestDocumentBuilderFactory(org.w3c.domts.JAXPDOMTestDocumentBuilderFactory) DOMTestDocumentBuilderFactory(org.w3c.domts.DOMTestDocumentBuilderFactory) JAXPDOMTestDocumentBuilderFactory(org.w3c.domts.JAXPDOMTestDocumentBuilderFactory)

Example 2 with JUnitTestSuiteAdapter

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

the class TestOracle method suite.

/**
	 * Constructor
	 * @return test suite
	 * @throws Exception
	 */
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 });
    DocumentBuilderFactory oracleFactory = (DocumentBuilderFactory) ClassLoader.getSystemClassLoader().loadClass("oracle.xml.jaxp.JXDocumentBuilderFactory").newInstance();
    DOMTestDocumentBuilderFactory factory = new JAXPDOMTestDocumentBuilderFactory(oracleFactory, 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 3 with JUnitTestSuiteAdapter

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

use of org.w3c.domts.JUnitTestSuiteAdapter 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.xpath.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 5 with JUnitTestSuiteAdapter

use of org.w3c.domts.JUnitTestSuiteAdapter 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.xpath.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)75 JUnitTestSuiteAdapter (org.w3c.domts.JUnitTestSuiteAdapter)75 Constructor (java.lang.reflect.Constructor)73 JAXPDOMTestDocumentBuilderFactory (org.w3c.domts.JAXPDOMTestDocumentBuilderFactory)60 DocumentBuilderFactory (javax.xml.parsers.DocumentBuilderFactory)30 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 XercesHTML2DocumentBuilderFactory (org.w3c.domts.XercesHTML2DocumentBuilderFactory)1 XercesHTMLDocumentBuilderFactory (org.w3c.domts.XercesHTMLDocumentBuilderFactory)1