Class PerFileSuite
java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner<org.junit.runner.Runner>
org.junit.runners.Suite
org.checkerframework.framework.test.PerFileSuite
- All Implemented Interfaces:
org.junit.runner.Describable
,org.junit.runner.manipulation.Filterable
,org.junit.runner.manipulation.Orderable
,org.junit.runner.manipulation.Sortable
public class PerFileSuite
extends org.junit.runners.Suite
PerDirectorySuite runs a test class once for each set of parameters returned by its method marked
with
@Parameters
To use:
Annotated your test class with @RunWith(PerDirectorySuite.class)
Create a parameters method by annotating a public static method with @Parameters
. This
method must return either a List<File>
where each element of the list is a Java file to
test against OR a String []
where each String in the array is a directory in the tests
directory.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.junit.runners.Suite
org.junit.runners.Suite.SuiteClasses
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected List<org.junit.runner.Runner>
protected final File
Resolves the directory specified byTestRootDirectory
or defaults tocurrentDir/tests
.Methods inherited from class org.junit.runners.Suite
describeChild, emptySuite, runChild
Methods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, classRules, collectInitializationErrors, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, isIgnored, order, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses, withInterruptIsolation
Methods inherited from class org.junit.runner.Runner
testCount
-
Constructor Details
-
PerFileSuite
Only called reflectively. Do not use programmatically.- Parameters:
klass
- the class whose tests to run- Throws:
Throwable
-
-
Method Details
-
getChildren
- Overrides:
getChildren
in classorg.junit.runners.Suite
-
resolveTestDirectory
Resolves the directory specified byTestRootDirectory
or defaults tocurrentDir/tests
.- Returns:
- the resolved directory
-