01: // You can redistribute this software and/or modify it under the terms of
02: // the Ozone Library License version 1 published by ozone-db.org.
03: //
04: // The original code and portions created by SMB are
05: // Copyright (C) 1997-2001 by SMB GmbH. All rights reserved.
06: //
07: // $Id: OpenXmlTestSuite.java,v 1.2 2002/02/09 18:46:47 per_nyfelt Exp $
08:
09: package test.openxml;
10:
11: import java.net.URL;
12:
13: import junit.framework.Test;
14: import junit.framework.TestCase;
15: import junit.framework.TestSuite;
16: import junit.textui.TestRunner;
17:
18: public class OpenXmlTestSuite extends TestCase {
19:
20: public static String propertiesFileName;
21: public static String xmlTestDataFileName;
22:
23: static {
24: propertiesFileName = Thread.currentThread()
25: .getContextClassLoader().getResource(
26: "OpenXmlTestSuite.properties").getFile();
27: xmlTestDataFileName = Thread.currentThread()
28: .getContextClassLoader().getResource("testData.xml")
29: .getFile();
30: }
31:
32: public OpenXmlTestSuite(String name) {
33: super (name);
34: }
35:
36: /**
37: * @return test suite of all tests
38: */
39: public static Test suite() {
40: TestSuite suite = new TestSuite("All OpenXML Tests");
41: suite.addTest(Obj2XMLTest.suite());
42: suite.addTest(XML2ObjTest.suite());
43: return suite;
44: }
45:
46: public static void main(String args[]) throws Exception {
47: // allow to overrride the location of the files if desired
48: if (args.length > 0) {
49: propertiesFileName = args[0];
50: }
51: if (args.length > 1) {
52: xmlTestDataFileName = args[1];
53: }
54: TestRunner.run(suite());
55: }
56: }
|