KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > xmldb > XMLDBTestSuite


1 /*
2  * The XML:DB Initiative Software License, Version 1.0
3  *
4  *
5  * Copyright (c) 2000-2001 The XML:DB Initiative. All rights
6  * reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in
17  * the documentation and/or other materials provided with the
18  * distribution.
19  *
20  * 3. The end-user documentation included with the redistribution,
21  * if any, must include the following acknowledgment:
22  * "This product includes software developed by the
23  * XML:DB Initiative (http://www.xmldb.org/)."
24  * Alternately, this acknowledgment may appear in the software itself,
25  * if and wherever such third-party acknowledgments normally appear.
26  *
27  * 4. The name "XML:DB Initiative" must not be used to endorse or
28  * promote products derived from this software without prior written
29  * permission. For written permission, please contact info@xmldb.org.
30  *
31  * 5. Products derived from this software may not be called "XML:DB",
32  * nor may "XML:DB" appear in their name, without prior written
33  * permission of the XML:DB Initiative.
34  *
35  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
36  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
37  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
38  * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
39  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
40  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
41  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
42  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
43  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
44  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
45  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
46  * SUCH DAMAGE.
47  * ====================================================================
48  *
49  * This software consists of voluntary contributions made by many
50  * individuals on behalf of the XML:DB Initiative. For more information
51  * on the XML:DB Initiative, please see <http://www.xmldb.org/>.
52  */

53 package test.xmldb;
54
55 import junit.framework.*;
56 import junit.textui.TestRunner;
57 import test.xmldb.levelzero.LevelZeroTest;
58 import test.xmldb.other.CollectionTest;
59 import test.xmldb.other.ResourceTest;
60 import test.xmldb.other.ConnectionTest;
61 import org.apache.log4j.BasicConfigurator;
62 import org.apache.log4j.Category;
63 import org.apache.log4j.Level;
64
65 public class XMLDBTestSuite extends TestCase {
66     public static String JavaDoc propertiesFileName;
67
68     public static void main( String JavaDoc args[] ) throws Exception JavaDoc {
69         // set up log4j
70
BasicConfigurator.configure();
71         Category.getRoot().setLevel(Level.INFO);
72         // allow to overrride the location of the properties file if desired
73
if (args.length > 0) {
74             propertiesFileName = args[0];
75         }
76         TestRunner.run(suite());
77     }
78
79     public static Test suite() {
80         TestSuite suite = new TestSuite("All XML:DB Tests");
81         suite.addTestSuite(CollectionTest.class);
82         suite.addTestSuite(ResourceTest.class);
83         suite.addTestSuite(ConnectionTest.class);
84         suite.addTest(LevelZeroTest.suite());
85         return suite;
86     }
87
88     public XMLDBTestSuite(String JavaDoc name) {
89       super(name);
90    }
91 }
92
93
Popular Tags