|
JUnit-addons version 1.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junitx.framework.TestSuite | +--junitx.framework.OrderedTestSuite
Constructs an alphabetically ordered suite of tests.
Warning: if you are tempted to use this class, think twice before doing it. Ideally the tests should be independant from one another so first try to refactor them and use the TestSetup class to initialize them. But if you still want to use this class... it's up to you.
Field Summary | |
protected java.util.List |
fTests
|
Constructor Summary | |
OrderedTestSuite()
Creates an OrderedTestSuite with no name. |
|
OrderedTestSuite(java.lang.Class theClass)
Constructs a OrderedTestSuite from the given class. |
|
OrderedTestSuite(java.lang.String name)
Creates an OrderedTestSuite with the given name. |
Method Summary | |
void |
addTest(junit.framework.Test test)
Adds a test to the suite. |
void |
addTestSuite(java.lang.Class testClass)
Adds the tests from the given class to the suite |
int |
countTestCases()
Counts the number of test cases that will be run by this test. |
java.lang.String |
getName()
Returns the name of the suite. |
void |
run(junit.framework.TestResult result)
Runs the tests and collects their result in a TestResult. |
void |
runTest(junit.framework.Test test,
junit.framework.TestResult result)
|
void |
setName(java.lang.String name)
Sets the name of the suite. |
protected void |
sortTests(int left,
int right)
|
junit.framework.Test |
testAt(int index)
Returns the test at the given index |
int |
testCount()
Returns the number of tests in this suite |
java.util.Enumeration |
tests()
Returns the tests as an enumeration |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.List fTests
Constructor Detail |
public OrderedTestSuite()
public OrderedTestSuite(java.lang.Class theClass)
The method calls addTest for each insertion of test methods found so the sorting is done for each method, and not at the end.
public OrderedTestSuite(java.lang.String name)
Method Detail |
public void addTest(junit.framework.Test test)
addTest
in class junitx.framework.TestSuite
protected void sortTests(int left, int right)
public void addTestSuite(java.lang.Class testClass)
public int countTestCases()
countTestCases
in interface junit.framework.Test
public void run(junit.framework.TestResult result)
run
in interface junit.framework.Test
public void runTest(junit.framework.Test test, junit.framework.TestResult result)
public junit.framework.Test testAt(int index)
public int testCount()
public java.util.Enumeration tests()
public java.lang.String toString()
toString
in class java.lang.Object
public void setName(java.lang.String name)
name
- The name to setpublic java.lang.String getName()
|
JUnit-addons version 1.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |