@API(status=INTERNAL, since="4.12") public class RunnerTestDescriptor extends VintageTestDescriptor
Modifier and Type | Class and Description |
---|---|
private static class |
RunnerTestDescriptor.ExcludeDescriptionFilter |
TestDescriptor.Type, TestDescriptor.Visitor
Modifier and Type | Field and Description |
---|---|
private java.util.List<org.junit.runner.manipulation.Filter> |
filters |
private static Logger |
logger |
private java.util.Set<org.junit.runner.Description> |
rejectedExclusions |
private org.junit.runner.Runner |
runner |
private boolean |
wasFiltered |
description, ENGINE_ID, SEGMENT_TYPE_DYNAMIC, SEGMENT_TYPE_RUNNER, SEGMENT_TYPE_TEST
children
Constructor and Description |
---|
RunnerTestDescriptor(UniqueId uniqueId,
java.lang.Class<?> testClass,
org.junit.runner.Runner runner) |
Modifier and Type | Method and Description |
---|---|
void |
applyFilters(java.util.function.Consumer<RunnerTestDescriptor> childrenCreator) |
protected boolean |
canBeRemovedFromHierarchy() |
void |
clearFilters() |
java.util.Optional<java.util.List<org.junit.runner.manipulation.Filter>> |
getFilters() |
private org.junit.runner.Runner |
getRunnerToReport() |
private void |
logIncompleteFiltering() |
void |
prune()
Remove this descriptor from the hierarchy unless it is a root or contains
tests.
|
org.junit.runner.Request |
toRequest() |
protected boolean |
tryToExcludeFromRunner(org.junit.runner.Description description) |
private boolean |
tryToFilterRunner(org.junit.runner.Description description) |
private void |
warnAboutUnfilterableRunner() |
getDescription, getLegacyReportingName, getTags, getType, pruneDescriptorsForObsoleteDescriptions, removeFromHierarchy
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, setParent, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
accept, containsTests, getDescendants, isContainer, isRoot, isTest, mayRegisterTests
private static final Logger logger
private final java.util.Set<org.junit.runner.Description> rejectedExclusions
private org.junit.runner.Runner runner
private boolean wasFiltered
private java.util.List<org.junit.runner.manipulation.Filter> filters
public RunnerTestDescriptor(UniqueId uniqueId, java.lang.Class<?> testClass, org.junit.runner.Runner runner)
public org.junit.runner.Request toRequest()
protected boolean tryToExcludeFromRunner(org.junit.runner.Description description)
tryToExcludeFromRunner
in class VintageTestDescriptor
private boolean tryToFilterRunner(org.junit.runner.Description description)
protected boolean canBeRemovedFromHierarchy()
canBeRemovedFromHierarchy
in class VintageTestDescriptor
public void prune()
TestDescriptor
A concrete TestEngine
may override this method in order to
implement a different algorithm or to skip pruning altogether.
private void logIncompleteFiltering()
private void warnAboutUnfilterableRunner()
public java.util.Optional<java.util.List<org.junit.runner.manipulation.Filter>> getFilters()
public void clearFilters()
public void applyFilters(java.util.function.Consumer<RunnerTestDescriptor> childrenCreator)
private org.junit.runner.Runner getRunnerToReport()