1/*
2 * Copyright (C) 2008 Google Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 * use this file except in compliance with the License. You may obtain a copy of
6 * the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 * License for the specific language governing permissions and limitations under
14 * the License.
15 */
16
17package tests.api.org.w3c.dom;
18
19import junit.framework.Test;
20import junit.framework.TestSuite;
21
22import org.w3c.domts.DOMTestDocumentBuilderFactory;
23import org.w3c.domts.DOMTestSuite;
24import org.w3c.domts.JAXPDOMTestDocumentBuilderFactory;
25import org.w3c.domts.JUnitTestSuiteAdapter;
26
27/**
28 * Listing of all the tests that are to be run.
29 */
30public class AllTests_Level2 {
31    /*public static void run() {
32        TestRunner.main(new String[] {Main_AllTests.class.getName()});
33    }*/
34
35    public static final Test suite() {
36        // from http://www.w3.org/DOM/Test/
37        // Level 2 Core tests
38        DOMTestSuite domSuite;
39        try {
40            DOMTestDocumentBuilderFactory factory1 =
41                new JAXPDOMTestDocumentBuilderFactory(null,
42                JAXPDOMTestDocumentBuilderFactory.getConfiguration1());
43
44                // android: coalescing, epand, ignorewhitespace, namespace, NOT validation
45
46            domSuite = new org.w3c.domts.level2.core.alltests(factory1);
47        } catch (Exception e) {
48            throw new RuntimeException("problem creating dom test suite", e);
49        }
50        TestSuite suite = new JUnitTestSuiteAdapter(domSuite);
51        return suite;
52    }
53}
54