|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--net.sourceforge.groboutils.junit.v1.TestRunnable
Instances are executed in the runTestRunnables method of the MultiThreadedTestRunner class. TestCases should define inner classes as a subclass of this, implement the runTest() method, and pass in the instantiated class as part of an array to the runTestRunnables method. Call delay to easily include a waiting period. This class allows for all assertions to be invoked, so that subclasses can be static or defined outside a TestCase. If an exception is thrown from the runTest() method, then all other test threads will terminate due to the error.
Constructor Summary | |
TestRunnable()
|
Method Summary | |
void |
delay(long millis)
Sleep for millis milliseconds. |
void |
run()
Unable to make this a "final" method due to JDK 1.1 compatibility. |
abstract void |
runTest()
|
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TestRunnable()
Method Detail |
public abstract void runTest() throws java.lang.Throwable
java.lang.Throwable
public void delay(long millis) throws java.lang.InterruptedException
java.lang.InterruptedException
- if an interrupt occured during the
8 sleep.public void run()
run
in interface java.lang.Runnable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |