| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.junit.runner.Runner
org.junit.runners.ParentRunner<Runner>
org.junit.runners.Suite
public class Suite
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.SuiteClassesThe SuiteClassesannotation specifies the classes to be run when a class
 annotated with@RunWith(Suite.class)is run. | 
| Constructor Summary | |
|---|---|
| protected  | Suite(java.lang.Class<?> klass,
      java.lang.Class<?>[] suiteClasses)Call this when the default builder is good enough. | 
| protected  | Suite(java.lang.Class<?> klass,
      java.util.List<Runner> runners)Called by this class and subclasses once the runners making up the suite have been determined | 
|   | Suite(java.lang.Class<?> klass,
      org.junit.runners.model.RunnerBuilder builder)Called reflectively on classes annotated with @RunWith(Suite.class) | 
|   | Suite(org.junit.runners.model.RunnerBuilder builder,
      java.lang.Class<?>[] classes)Call this when there is no single root class (for example, multiple class names passed on the command line to JUnitCore | 
| protected  | Suite(org.junit.runners.model.RunnerBuilder builder,
      java.lang.Class<?> klass,
      java.lang.Class<?>[] suiteClasses)Called by this class and subclasses once the classes making up the suite have been determined | 
| Method Summary | |
|---|---|
| protected  Description | describeChild(Runner child)Returns a Descriptionforchild, which can be assumed to
 be an element of the list returned byParentRunner.getChildren() | 
| protected  java.util.List<Runner> | getChildren()Returns a list of objects that define the children of this Runner. | 
| protected  void | runChild(Runner runner,
         RunNotifier notifier)Runs the test corresponding to child, which can be assumed to be
 an element of the list returned byParentRunner.getChildren(). | 
| Methods inherited from class org.junit.runners.ParentRunner | 
|---|
| childrenInvoker, classBlock, collectInitializationErrors, filter, getDescription, getName, getTestClass, run, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses | 
| 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 | 
|---|
public Suite(java.lang.Class<?> klass,
             org.junit.runners.model.RunnerBuilder builder)
      throws org.junit.runners.model.InitializationError
@RunWith(Suite.class)
klass - the root classbuilder - builds runners for classes in the suite
org.junit.runners.model.InitializationError
public Suite(org.junit.runners.model.RunnerBuilder builder,
             java.lang.Class<?>[] classes)
      throws org.junit.runners.model.InitializationError
JUnitCore
builder - builds runners for classes in the suiteclasses - the classes in the suite
org.junit.runners.model.InitializationError
protected Suite(java.lang.Class<?> klass,
                java.lang.Class<?>[] suiteClasses)
         throws org.junit.runners.model.InitializationError
klass - the root of the suitesuiteClasses - the classes in the suite
org.junit.runners.model.InitializationError
protected Suite(org.junit.runners.model.RunnerBuilder builder,
                java.lang.Class<?> klass,
                java.lang.Class<?>[] suiteClasses)
         throws org.junit.runners.model.InitializationError
builder - builds runners for classes in the suiteklass - the root of the suitesuiteClasses - the classes in the suite
org.junit.runners.model.InitializationError
protected Suite(java.lang.Class<?> klass,
                java.util.List<Runner> runners)
         throws org.junit.runners.model.InitializationError
klass - root of the suiterunners - for each class in the suite, a Runner
org.junit.runners.model.InitializationError| Method Detail | 
|---|
protected java.util.List<Runner> getChildren()
ParentRunner
getChildren in class ParentRunner<Runner>protected Description describeChild(Runner child)
ParentRunnerDescription for child, which can be assumed to
 be an element of the list returned by ParentRunner.getChildren()
describeChild in class ParentRunner<Runner>
protected void runChild(Runner runner,
                        RunNotifier notifier)
ParentRunnerchild, which can be assumed to be
 an element of the list returned by ParentRunner.getChildren().
 Subclasses are responsible for making sure that relevant test events are
 reported through notifier
runChild in class ParentRunner<Runner>| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||