public class TransformingParentRunner<T>
extends org.junit.runners.ParentRunner<T>
The transforms operate on input list of descriptions and return a new copy of this list with any necessary modifications. Only corresponding children of the descriptions will be executed by this runner. The transforms get applied recursively over the whole runner tree.
SuiteTransform
Constructor and Description |
---|
TransformingParentRunner(org.junit.runners.ParentRunner<T> original,
Iterable<SuiteTransform> transforms) |
TransformingParentRunner(String name,
org.junit.runners.ParentRunner<T> original,
Iterable<SuiteTransform> transforms) |
Modifier and Type | Method and Description |
---|---|
static List<org.junit.runner.Description> |
applyTransforms(Iterable<org.junit.runner.Description> input,
Iterable<SuiteTransform> transforms) |
protected org.junit.runner.Description |
describeChild(T child) |
protected List<T> |
getChildren() |
org.junit.runner.Description |
getDescription() |
protected String |
getName() |
protected void |
runChild(T child,
org.junit.runner.notification.RunNotifier notifier) |
protected org.junit.runners.ParentRunner<?> |
wrap(org.junit.runners.ParentRunner<?> original,
List<SuiteTransform> transforms)
Wrap child of this runner that itself is parent runner in an instance that will provide transformations over
its children (if necessary).
|
public TransformingParentRunner(String name, org.junit.runners.ParentRunner<T> original, Iterable<SuiteTransform> transforms) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationError
public TransformingParentRunner(org.junit.runners.ParentRunner<T> original, Iterable<SuiteTransform> transforms) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationError
public static List<org.junit.runner.Description> applyTransforms(Iterable<org.junit.runner.Description> input, Iterable<SuiteTransform> transforms)
protected org.junit.runners.ParentRunner<?> wrap(org.junit.runners.ParentRunner<?> original, List<SuiteTransform> transforms) throws org.junit.runners.model.InitializationError
Wrap child of this runner that itself is parent runner in an instance that will provide transformations over its children (if necessary).
Override this method to handle specific parent runner subclasses that override its protected or public methods,
linke e.g. ParentRunner.run(org.junit.runner.notification.RunNotifier)
. Otherwise this
class will break those runners.
original
- original runner instancetransforms
- list of transformsorg.junit.runners.model.InitializationError
- runner initialization errorprotected List<T> getChildren()
getChildren
in class org.junit.runners.ParentRunner<T>
protected org.junit.runner.Description describeChild(T child)
describeChild
in class org.junit.runners.ParentRunner<T>
protected void runChild(T child, org.junit.runner.notification.RunNotifier notifier)
runChild
in class org.junit.runners.ParentRunner<T>
public org.junit.runner.Description getDescription()
getDescription
in interface org.junit.runner.Describable
getDescription
in class org.junit.runners.ParentRunner<T>
Copyright © 2002-2017 Atlassian. All Rights Reserved.