|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ccl.util.Test | +--junit.framework.TestCase
This class is a fake for JUnit test classes. It redirects all your test code to use the test class from the ccl.util.Test class.
To execute your tests written for the JUnit API with the ccl.util.Test class, write code like this:
public void main( String[] args ) { TestCase testCase = new MyTest(); testCase.setVerbose( true ); testCase.setTiming ( true ); testCase.run(); testCase.printResults(); System.exit( 0 ); }
for details how to build a hierarchy of
tests
Constructor Summary | |
TestCase()
Default constructor expected in Test. |
|
TestCase(java.lang.String testName)
Standard constructor expected in JUnit TestCase. |
|
TestCase(Test test)
Standard constructor expected in Test. |
Method Summary | |
protected void |
_doIt()
This method gets invoked from the ccl.util.Test class and is responsible for executed all test code. |
void |
assert(java.lang.String message,
boolean check)
Maps the JUnit standard assertion to Test's assertion. |
protected void |
enterSubTest(java.lang.String testName)
A workaround method to be able to use reflection to invoke the super method _enterSubTest. |
protected void |
exitSubTest()
A workaround method to be able to use reflection to invoke the super method _exitSubTest. |
static java.util.Vector |
getMethods(java.lang.Object object)
Returns all public methods of an object. |
static java.util.Vector |
getTestMethods(java.lang.Object object)
Returns all methods of an object that conform to the test method convention. |
void |
invokeTestMethod(java.lang.reflect.Method testMethod)
Used to invoke the test methods. |
static void |
invokeTestMethod(java.lang.reflect.Method testMethod,
java.lang.Object object)
Used to invoke the test methods. |
Methods inherited from class ccl.util.Test |
_enterSubTest, _exitSubTest, _getValue, _increment, _setTests, _showLiveSignals, assert, Assert, assert, Assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertTrue, assertTrue, assertTrue, bug, bugIf, bugIf, bugIf, fail, fail, getBugs, getComment, getGlobalTests, getLocalTests, getName, getTestClassDirectory, getTestDirectory, getTestName, getTestName, getValue, initialize, isTest, isTiming, isVerbose, printResult, printResult, redirectStandardStreams, run, setBug, setParentTest, setTests, setTiming, setValue, setVerbose, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TestCase()
public TestCase(Test test)
public TestCase(java.lang.String testName)
Method Detail |
protected void _doIt() throws java.lang.Exception
_doIt
in class Test
java.lang.Exception
- Whatever can go wrong.public void assert(java.lang.String message, boolean check)
protected void enterSubTest(java.lang.String testName)
protected void exitSubTest()
public void invokeTestMethod(java.lang.reflect.Method testMethod) throws java.lang.Exception
java.lang.Exception
public static void invokeTestMethod(java.lang.reflect.Method testMethod, java.lang.Object object) throws java.lang.Exception
java.lang.Exception
public static java.util.Vector getTestMethods(java.lang.Object object)
public static java.util.Vector getMethods(java.lang.Object object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |