j2meunit.framework
Interface Test

All Known Implementing Classes:
TestCase, TestSuite

public interface Test

A Test can be run and collect its results.

See Also:
TestResult

Method Summary
 int countTestCases()
          Counts the number of test cases that will be run by this test.
 int countTestSteps()
          Counts the number of test steps that will be run by this test.
 void run(TestResult result)
          Runs a test and collects its result in a TestResult instance.
 

Method Detail

countTestCases

public int countTestCases()
Counts the number of test cases that will be run by this test.

Returns:
The number of test cases

countTestSteps

public int countTestSteps()
Counts the number of test steps that will be run by this test. Test steps are distinct parts of a test that shall be monitored separately. This can be used to show the progress of large tests that take a large amount of time (e.g. storage access or encryption). Each test step then needs to invoke TestCase.testStepFinished() after it ran successfully. For short tests this method should return the same value as countTestCases(). For long tests the return value should include the result of countTestCases() because completed tests are counted too.

Returns:
The number of test steps

run

public void run(TestResult result)
Runs a test and collects its result in a TestResult instance.