edu.umd.cs.mtc
Class MultithreadedTest
java.lang.Object
junit.framework.Assert
edu.umd.cs.mtc.MultithreadedTestCase
edu.umd.cs.mtc.MultithreadedTest
- All Implemented Interfaces:
- Test
public abstract class MultithreadedTest
- extends MultithreadedTestCase
- implements Test
Extends MultithreadedTestCase
by implementing
Test
so that tests can be added to a
TestSuite
- Since:
- 1.0
- Author:
- William Pugh, Nathaniel Ayewah
- See Also:
MultithreadedTestCase
Methods inherited from class edu.umd.cs.mtc.MultithreadedTestCase |
assertTick, awaitOn, finish, freezeClock, getThread, getThreadByName, getTick, getTrace, goodbye, hello, initialize, isClockFrozen, 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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultithreadedTest
public MultithreadedTest()
countTestCases
public int countTestCases()
- Specified by:
countTestCases
in interface Test
run
public void run(TestResult result)
- Specified by:
run
in interface Test
runBare
protected void runBare()
throws java.lang.Throwable
- Runs the bare test sequence, including setUp and tearDown
if available.
- Throws:
java.lang.Throwable
- if any exception is thrown
runTest
public void runTest()
throws java.lang.Throwable
- This is the method that runs this test. It is equivalent to the
testXxx methods in JUnit 3. By default the test is just run once,
by calling
TestFramework.runOnce(MultithreadedTestCase)
.
To change the way the test is run, simply override this method.
- Throws:
java.lang.Throwable
- if any exception is thrown- See Also:
TestFramework.runOnce(MultithreadedTestCase)
,
TestFramework.runOnce(MultithreadedTestCase, Integer, Integer)
,
TestFramework.runManyTimes(MultithreadedTestCase, int)
,
TestFramework.runManyTimes(MultithreadedTestCase, int, Integer, Integer)
addSetUpAndTearDown
void addSetUpAndTearDown(TestCase tc,
java.lang.reflect.Method setUp,
java.lang.reflect.Method tearDown)
- If this
MultithreadedTest
is added to a test suite using
TestFramework.buildTestSuite(Class)
, and if it is a non-static
inner class of a TestCase
, then the setUp and tearDown methods
should be called before and after the test is run respectively. This
method is used by
TestFramework.addSetUpAndTearDown(MultithreadedTest, TestCase)
to provide the necessary references so that these methods can be invoked.
- Parameters:
tc
- setUp
- tearDown
-