junit.framework
Class JUnit4TestAdapter

java.lang.Object
  extended by junit.framework.JUnit4TestAdapter
All Implemented Interfaces:
Test, Describable, Filterable, Sortable

public class JUnit4TestAdapter
extends Object
implements Test, Filterable, Sortable, Describable


Constructor Summary
JUnit4TestAdapter(Class<?> newTestClass)
           
JUnit4TestAdapter(Class<?> newTestClass, JUnit4TestAdapterCache cache)
           
 
Method Summary
 int countTestCases()
          Counts the number of test cases that will be run by this test.
 void filter(Filter filter)
          Remove tests that don't pass the parameter filter.
 Description getDescription()
           
 Class<?> getTestClass()
           
 List<Test> getTests()
           
 void run(TestResult result)
          Runs a test and collects its result in a TestResult instance.
 void sort(Sorter sorter)
          Sorts the tests using sorter
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JUnit4TestAdapter

public JUnit4TestAdapter(Class<?> newTestClass)

JUnit4TestAdapter

public JUnit4TestAdapter(Class<?> newTestClass,
                         JUnit4TestAdapterCache cache)
Method Detail

countTestCases

public int countTestCases()
Description copied from interface: Test
Counts the number of test cases that will be run by this test.

Specified by:
countTestCases in interface Test

run

public void run(TestResult result)
Description copied from interface: Test
Runs a test and collects its result in a TestResult instance.

Specified by:
run in interface Test

getTests

public List<Test> getTests()

getTestClass

public Class<?> getTestClass()

getDescription

public Description getDescription()
Specified by:
getDescription in interface Describable
Returns:
a Description showing the tests to be run by the receiver

toString

public String toString()
Overrides:
toString in class Object

filter

public void filter(Filter filter)
            throws NoTestsRemainException
Description copied from interface: Filterable
Remove tests that don't pass the parameter filter.

Specified by:
filter in interface Filterable
Parameters:
filter - the Filter to apply
Throws:
NoTestsRemainException - if all tests are filtered out

sort

public void sort(Sorter sorter)
Description copied from interface: Sortable
Sorts the tests using sorter

Specified by:
sort in interface Sortable
Parameters:
sorter - the Sorter to use for sorting the tests