org.junit.runners

Class Suite

Implemented Interfaces:
Filterable, Sortable
Known Direct 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 junit.framework.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.

Field Summary

Fields inherited from class org.junit.internal.runners.TestClassRunner

fEnclosedRunner

Constructor Summary

Suite(Class klass)
Internal use only.
Suite(Class klass, Class[] annotatedClasses)

Method Summary

protected @Override
void validate(org.junit.internal.runners.MethodValidator methodValidator)

Methods inherited from class org.junit.internal.runners.TestClassRunner

Description getDescription, filter, getTestClass, sort, validate, void run

Methods inherited from class org.junit.runner.Runner

getDescription, run, testCount

Constructor Details

Suite

public Suite(Class klass)
            throws org.junit.internal.runners.InitializationError
Internal use only.

Suite

protected Suite(Class klass,
                Class[] annotatedClasses)
            throws org.junit.internal.runners.InitializationError

Method Details

void validate

protected @Override void validate(org.junit.internal.runners.MethodValidator methodValidator)