|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--junit.framework.TestCase | +--net.groboclown.junit.v1.MultiThreadedTestCase
A test case framework which allows for an array of tests to be run asynchronously.
Inner Class Summary | |
private class |
MultiThreadedTestCase.StopThreadsTest
Sends a message to |
protected class |
MultiThreadedTestCase.TestCaseRunnable
Inner class which is executed in the runTestCaseRunnables method. |
Field Summary | |
private Object |
m_synch
|
private junit.framework.TestResult |
m_testResult
The tests TestResult |
private ThreadGroup |
m_threadGroup
|
private boolean |
m_threadsFinished
|
Fields inherited from class junit.framework.TestCase |
fName |
Constructor Summary | |
MultiThreadedTestCase(String name)
|
Method Summary | |
private void |
handleException(Throwable t)
Handle an exception by sending them to the test results. |
private void |
interruptThreads()
|
void |
run(junit.framework.TestResult result)
Override run so we can save the test result |
protected void |
runTestCaseRunnables(MultiThreadedTestCase.TestCaseRunnable[] runnables)
Run each test given in a separate thread. |
protected void |
runTestCaseRunnables(MultiThreadedTestCase.TestCaseRunnable[] runnables,
long maxTime)
Run each test given in a separate thread. |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, name, run, runBare, runTest, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame |
Methods inherited from class java.lang.Object |
|
Field Detail |
private junit.framework.TestResult m_testResult
private Object m_synch
private boolean m_threadsFinished
private ThreadGroup m_threadGroup
Constructor Detail |
public MultiThreadedTestCase(String name)
Method Detail |
public void run(junit.framework.TestResult result)
run
in class junit.framework.TestCase
protected void runTestCaseRunnables(MultiThreadedTestCase.TestCaseRunnable[] runnables)
protected void runTestCaseRunnables(MultiThreadedTestCase.TestCaseRunnable[] runnables, long maxTime)
runnables
- the list of TestCaseRunnable objects to run
asynchronouslymaxTime
- the maximum amount of milliseconds to wait for
the tests to run. If the time is <= 0, then the tests
will run until they are complete. Otherwise, any threads that
don'tprivate void handleException(Throwable t)
private void interruptThreads()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |