|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
edu.umd.cs.mtc.MultithreadedTestCase
edu.umd.cs.mtc.MultithreadedTest
public abstract class MultithreadedTest
Extends MultithreadedTestCase
by implementing
Test
so that tests can be added to a
TestSuite.
When using this class, the default behavior
is to run the test once. To change this default behavior,
override runTest()
. For example, to run a test 20
times, override:
public void runTest() throws Throwable {
TestFramework.runManyTimes(this, 20);
}
MultithreadedTestCase
,
runTest()
Constructor Summary | |
---|---|
MultithreadedTest()
|
Method Summary | |
---|---|
int |
countTestCases()
|
void |
run(junit.framework.TestResult result)
|
protected void |
runBare()
Runs the bare test sequence, including setUp and tearDown if available. |
void |
runTest()
This is the method that runs this test. |
Methods inherited from class edu.umd.cs.mtc.MultithreadedTestCase |
---|
assertTick, awaitOn, finish, freezeClock, getThread, getThreadByName, getTick, getTrace, initialize, isClockFrozen, mayYield, mayYield, putThread, setTrace, skipNextWait, unfreezeClock, waitForTick, waitForTick, waitOn |
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, failNotEquals, failNotSame, failSame |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultithreadedTest()
Method Detail |
---|
public int countTestCases()
countTestCases
in interface junit.framework.Test
public void run(junit.framework.TestResult result)
run
in interface junit.framework.Test
protected void runBare() throws java.lang.Throwable
java.lang.Throwable
- if any exception is thrownpublic void runTest() throws java.lang.Throwable
TestFramework.runOnce(MultithreadedTestCase)
.
To change the way the test is run, simply override this method.
java.lang.Throwable
- if any exception is thrownTestFramework.runOnce(MultithreadedTestCase)
,
TestFramework.runOnce(MultithreadedTestCase, Integer, Integer)
,
TestFramework.runManyTimes(MultithreadedTestCase, int)
,
TestFramework.runManyTimes(MultithreadedTestCase, int, Integer, Integer)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |