|
Copyright 2002 by aragost | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.aragost.junit.Util
| Constructor Summary | |
Util()
|
|
| Method Summary | |
static void |
addTests(TestSuite suite,
java.io.File root)
Iterate over all TestCasess found in the jar file or directory specified, and add them to the specified TestSuite. |
static TestSuite |
createJarTest(java.lang.Class cls)
Create a Test with all the TestCasess found in the same "library" as the specified Class. |
static TestSuite |
createJarTest(java.io.File root)
Create a Test with all the TestCasess found in the jar file specified. |
static boolean |
isConcreteTestCaseClass(java.lang.Class cls)
Check if the specified is a non-abstract public JUnit TestCase class. |
static void |
run(java.lang.Class testClass,
java.lang.String[] arguments)
Run the specified test class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Util()
| Method Detail |
public static TestSuite createJarTest(java.io.File root)
It will scan a jar file or subdirectory test cases and create a TestSuite with these tests.
Test method can be extremely useful to run all Tests for s specific project. You don't have to create a AllTests class and manually keep it up to date.
root - Where to search for TestCases
public static TestSuite createJarTest(java.lang.Class cls)
cls - Class in the library to create a Test for.
createJarTest(File)
public static void addTests(TestSuite suite,
java.io.File root)
suite - TestSuite to add the tests toroot - Where to search for TestCasespublic static boolean isConcreteTestCaseClass(java.lang.Class cls)
cls - Class to check
public static void run(java.lang.Class testClass,
java.lang.String[] arguments)
testClass - The test class to run.!arguments - The arguments for the runner.
java.lang.RuntimeException - If arguments are illegal
|
Copyright 2002 by aragost | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||