org.junit.runners
Class Suite

java.lang.Object
  extended by org.junit.runner.Runner
      extended by org.junit.internal.runners.TestClassRunner
          extended by org.junit.runners.Suite
All Implemented Interfaces:
Filterable, Sortable
Direct Known Subclasses:
Enclosed

public class Suite
extends org.junit.internal.runners.TestClassRunner

Using Suite as a runner allows you to manually build a suite containing tests from many classes. It is the JUnit 4 equivalent of the JUnit 3.8.x static Test suite() method. To use it, annotate a class with @RunWith(Suite.class) and SuiteClasses(TestClass1.class, ...). When you run this class, it will run all the tests in all the suite classes.


Nested Class Summary
static interface Suite.SuiteClasses
          The SuiteClasses annotation specifies the classes to be run when a class annotated with @RunWith(Suite.class) is run.
 
Field Summary
 
Fields inherited from class org.junit.internal.runners.TestClassRunner
fEnclosedRunner
 
Constructor Summary
  Suite(java.lang.Class<?> klass)
          Internal use only.
protected Suite(java.lang.Class<?> klass, java.lang.Class<?>[] annotatedClasses)
           
 
Method Summary
 
Methods inherited from class org.junit.internal.runners.TestClassRunner
filter, getDescription, getTestClass, run, sort, validate
 
Methods inherited from class org.junit.runner.Runner
testCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Suite

public Suite(java.lang.Class<?> klass)
      throws org.junit.internal.runners.InitializationError
Internal use only.

Throws:
org.junit.internal.runners.InitializationError

Suite

protected Suite(java.lang.Class<?> klass,
                java.lang.Class<?>[] annotatedClasses)
         throws org.junit.internal.runners.InitializationError
Throws:
org.junit.internal.runners.InitializationError