unitee.common
Interface TestSuite

All Known Implementing Classes:
DefaultTestSuite, RemoteTestSuiteStub

public interface TestSuite
extends Test

TestSuite is a compound test entity. It can hold references to TestCases and TestSuites beneeth it. Test suite is testable too. Testing a TestSuite means to run all test cases and nested TestSuites of the test suite.


Method Summary
 void addTest(Test test)
          Adds a test case into this suite.
 TestSuite asSuite()
          Tries to transform this AbstractTest into a TestSuite.
 Test findTest(java.lang.String qualifiedName)
          Searches for a test in this test suite and in the child suites.
 Test[] getTests()
          Returns all tests (both test case holders and test suites).
 void init()
          Initializes all tests within this suite.
 void relocate(int oldIndex, int newIndex)
          Relocates a test within this test suite and shrinks the array.
 void removeTest(Test test)
          Deletes a test from this suite.
 void test(TestReport report)
          Calls test() for every test within this suite.
 
Methods inherited from interface unitee.common.Test
asTestCase, getName, getParent, getQualifiedName, getTestParameters, setName, setParent, setTestParameters
 

Method Detail

addTest

public void addTest(Test test)
Adds a test case into this suite.

removeTest

public void removeTest(Test test)
Deletes a test from this suite.

getTests

public Test[] getTests()
Returns all tests (both test case holders and test suites).

init

public void init()
          throws ParameterException
Initializes all tests within this suite.
Specified by:
init in interface Test
Tags copied from interface: Test
Returns:
void
Throws:
ParameterException - Initializes the test. If the test needs parameters , the framework is responsible to deliver them , but not through this method.

asSuite

public TestSuite asSuite()
Description copied from interface: Test
Tries to transform this AbstractTest into a TestSuite.
Specified by:
asSuite in interface Test
Throws:
Tries - to transform this class into TestSuite.

test

public void test(TestReport report)
Calls test() for every test within this suite.
Specified by:
test in interface Test
Tags copied from interface: Test
Parameters:
report - The report to which results will be logged.

relocate

public void relocate(int oldIndex,
                     int newIndex)
Relocates a test within this test suite and shrinks the array. If your array is - [ a b c d e f ] , and you run relocate(2,5) You will get --> [ a c d e b f ]. If your array is - [ a b c d e f ] , and you run relocate(5,2) You will get --> [ a e b c d f ]. do nothing.
Throws:
-  

findTest

public Test findTest(java.lang.String qualifiedName)
Searches for a test in this test suite and in the child suites.
Returns:
the found test , or null if the qualified name does not exist in this suite.