consciouscode.junit
Class TestSuite

java.lang.Object
  extended by junit.framework.TestSuite
      extended by consciouscode.junit.TestSuite
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
AutoSuite, SharedFixtureTestSuite

public class TestSuite
extends junit.framework.TestSuite

Extended TestSuite that can name itself from a given a TestSuite class.


Constructor Summary
protected TestSuite()
          Constructs an empty TestSuite, named after the instance's concrete class.
  TestSuite(Class<?> theClass)
          Constructs a TestSuite from the given class.
  TestSuite(String name)
          Constructs an empty TestSuite.
 
Method Summary
 void addTestSuite(Class suiteClass)
          Adds a given TestSuite to this suite, or generates a new suite from a given class.
 boolean classExtendsTestSuite(Class<?> suiteClass)
          Determines whether suiteClass is a subclass of junit.framework.TestSuite.
 
Methods inherited from class junit.framework.TestSuite
addTest, countTestCases, createTest, getName, getTestConstructor, run, runTest, setName, testAt, testCount, tests, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestSuite

protected TestSuite()
Constructs an empty TestSuite, named after the instance's concrete class. This is intended for subclass use.


TestSuite

public TestSuite(Class<?> theClass)
Constructs a TestSuite from the given class. Adds all the methods starting with "test" as test cases to the suite.


TestSuite

public TestSuite(String name)
Constructs an empty TestSuite.

Method Detail

addTestSuite

public void addTestSuite(Class suiteClass)
Adds a given TestSuite to this suite, or generates a new suite from a given class. If suiteClass is a subclass of junit.framework.TestSuite, then its public no-argument constructor is called, and the resulting instance is added to this suite. Otherwise, it is passed to the superclass implementation, which will attempt to generate a TestSuite from all the methods starting with "test" that take no arguments.

Overrides:
addTestSuite in class junit.framework.TestSuite
Parameters:
suiteClass - Must extend either TestSuite or TestCase.

classExtendsTestSuite

public boolean classExtendsTestSuite(Class<?> suiteClass)
Determines whether suiteClass is a subclass of junit.framework.TestSuite.



Copyright © 2001–2012 Todd V. Jonker. All Rights Reserved.