|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.util.jester.TestSuite
public abstract class TestSuite
The abstract superclass of test suites. A test suite runs tests on one or a set of objects. Test suites generally do not follow the class hierarchy in any way, but inherit directly from this class. Here is a brief description -- for more details and tutorial examples, see the package documentation. In order to make it possible for test suites to be run on objects of different classes -- such as subclasses or objects that implement interfaces -- all object creation should be parameterized by providing factory objects. Factory object can be a unit factory, in which case they provide (by convention) one version of the method create for each constructor, or a collaboration factory, in which case each role played in the collaboration has one or more version of a createRole method. In the case of unit factories, the factory inheritance hierarchy mimics the class hierarchy. In the case of collaboration factories, factories that create more specific classes tend should inherit from the more general factories, but the inheritance is less structured because there may be multiple subclasses. In general, a test suite contains:
Field Summary | |
---|---|
private java.lang.Object |
_factory
The factory. |
private TestHarness |
_testHarness
The test harness. |
Constructor Summary | |
---|---|
TestSuite()
|
Method Summary | |
---|---|
java.lang.Object |
getFactory()
Get the factory used by this test suite. |
TestHarness |
getTestHarness()
Get the test harness used by this test suite. |
void |
run()
Initialize the test harness and run all the tests that can be run by this class. |
void |
runAll()
Run all the tests that can be run by this class. |
abstract void |
runSuite()
Run the tests defined by this test suite. |
void |
runTestCase(TestCase testCase)
Run a single test case by passing it to the harness used by this test suite. |
void |
setFactory(java.lang.Object f)
Set the factory used by this test suite. |
void |
setTestHarness(TestHarness h)
Set the test harness used by this test suite. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private TestHarness _testHarness
private java.lang.Object _factory
Constructor Detail |
---|
public TestSuite()
Method Detail |
---|
public final void run()
public void runAll()
public abstract void runSuite()
public void runTestCase(TestCase testCase)
getTestHarness().runTestCase(testCase)
public void setTestHarness(TestHarness h)
public TestHarness getTestHarness()
public void setFactory(java.lang.Object f)
public java.lang.Object getFactory()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |