01: /*
02: * RunTest.java Sept 01, 2002
03: *
04: * Sample JUnit test using Loader for creating test database and
05: * inserting data into it.
06: *
07: */
08:
09: package test.org.webdocwf.util.loader;
10:
11: import junit.framework.*;
12: import java.io.*;
13: import java.sql.*;
14:
15: /**
16: * RunTest is the main class for starting tests of the Octopus application
17: * @author Radoslav Dutina
18: * @version 1.0
19: */
20: public class RunTests {
21:
22: /**
23: * This method starts test
24: * @return TestSuite object
25: */
26: public static Test suite() {
27: TestSuite suite = new TestSuite();
28: suite.addTestSuite(LoaderTest.class);
29: suite.addTestSuite(LoaderTest2.class);
30: suite.addTestSuite(LoaderTest3.class);
31: return suite;
32: }
33:
34: /**
35: * This is the main method of the RunTest class
36: * @param args is the input parameters
37: */
38: public static void main(String[] args) {
39: // set the file location as a property so that it is easy to pass around
40: System.setProperty(LoaderTest.DATABASE_LOCATION_PROPERTY,
41: args[0]);
42:
43: // kick off the tests. Note call main() instead of run() so that error codes
44: // are returned so that they can be trapped by ant
45: junit.textui.TestRunner
46: .main(new String[] { "test.org.webdocwf.util.loader.RunTests" });
47: }
48: }
|