|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlejosunit.framework.TestSuite
A TestSuite
is a Composite
of Tests.
It runs a collection of test cases. Here is an example using
the dynamic test definition.
TestSuite suite= new TestSuite(); suite.addTest(new MathTest("testAdd")); suite.addTest(new MathTest("testDivideByZero"));As leJOS does not support reflection, dynamic test cases extraction will not be supported.
lelosunit changes:
Test
Constructor Summary | |
TestSuite()
Constructs an empty TestSuite. |
Method Summary | |
void |
addTest(Test test)
Adds a test to the suite. |
int |
countTestCases()
Counts the number of test cases that will be run by this test. |
void |
run(TestResult result)
Runs the tests and collects their result in a TestResult. |
void |
runTest(Test test,
TestResult result)
Run the given test into the result. |
int |
testCount()
Returns the number of tests in this suite. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TestSuite()
Method Detail |
public void addTest(Test test)
test
- the test to be addedpublic int countTestCases()
countTestCases
in interface Test
public void run(TestResult result)
run
in interface Test
result
- the test result, to write the results intopublic void runTest(Test test, TestResult result)
test
- the test to be runresult
- the result, where the test has to be runpublic int testCount()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |