Class RunnerTestDescriptor
- java.lang.Object
-
- org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
-
- org.junit.vintage.engine.descriptor.VintageTestDescriptor
-
- org.junit.vintage.engine.descriptor.RunnerTestDescriptor
-
- All Implemented Interfaces:
TestDescriptor
@API(status=INTERNAL, since="4.12") public class RunnerTestDescriptor extends VintageTestDescriptor
- Since:
- 4.12
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
RunnerTestDescriptor.ExcludeDescriptionFilter
-
Nested classes/interfaces inherited from interface org.junit.platform.engine.TestDescriptor
TestDescriptor.Type, TestDescriptor.Visitor
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<org.junit.runner.manipulation.Filter>
filters
private boolean
ignored
private static org.junit.platform.commons.logging.Logger
logger
private java.util.Set<org.junit.runner.Description>
rejectedExclusions
private org.junit.runner.Runner
runner
private boolean
wasFiltered
-
Fields inherited from class org.junit.vintage.engine.descriptor.VintageTestDescriptor
description, ENGINE_ID, SEGMENT_TYPE_DYNAMIC, SEGMENT_TYPE_RUNNER, SEGMENT_TYPE_TEST
-
Fields inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
children
-
-
Constructor Summary
Constructors Constructor Description RunnerTestDescriptor(UniqueId uniqueId, java.lang.Class<?> testClass, org.junit.runner.Runner runner, boolean ignored)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
java.lang.String
getLegacyReportingName()
Get the name of this descriptor in a format that is suitable for legacy reporting infrastructure — for example, for reporting systems built on the Ant-based XML reporting format for JUnit 4.private org.junit.runner.Runner
getRunnerToReport()
boolean
isIgnored()
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()
-
Methods inherited from class org.junit.vintage.engine.descriptor.VintageTestDescriptor
getDescription, getTags, getType, pruneDescriptorsForObsoleteDescriptions, removeFromHierarchy
-
Methods inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, setParent, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.junit.platform.engine.TestDescriptor
accept, getAncestors, getDescendants, isContainer, isRoot, isTest, mayRegisterTests
-
-
-
-
Field Detail
-
logger
private static final org.junit.platform.commons.logging.Logger logger
-
rejectedExclusions
private final java.util.Set<org.junit.runner.Description> rejectedExclusions
-
runner
private org.junit.runner.Runner runner
-
ignored
private final boolean ignored
-
wasFiltered
private boolean wasFiltered
-
filters
private java.util.List<org.junit.runner.manipulation.Filter> filters
-
-
Constructor Detail
-
RunnerTestDescriptor
public RunnerTestDescriptor(UniqueId uniqueId, java.lang.Class<?> testClass, org.junit.runner.Runner runner, boolean ignored)
-
-
Method Detail
-
getLegacyReportingName
public java.lang.String getLegacyReportingName()
Description copied from interface:TestDescriptor
Get the name of this descriptor in a format that is suitable for legacy reporting infrastructure — for example, for reporting systems built on the Ant-based XML reporting format for JUnit 4.The default implementation delegates to
TestDescriptor.getDisplayName()
.- Specified by:
getLegacyReportingName
in interfaceTestDescriptor
- Overrides:
getLegacyReportingName
in classVintageTestDescriptor
- Returns:
- the legacy reporting name; never
null
or blank
-
toRequest
public org.junit.runner.Request toRequest()
-
tryToExcludeFromRunner
protected boolean tryToExcludeFromRunner(org.junit.runner.Description description)
- Overrides:
tryToExcludeFromRunner
in classVintageTestDescriptor
-
tryToFilterRunner
private boolean tryToFilterRunner(org.junit.runner.Description description)
-
canBeRemovedFromHierarchy
protected boolean canBeRemovedFromHierarchy()
- Overrides:
canBeRemovedFromHierarchy
in classVintageTestDescriptor
-
prune
public void prune()
Description copied from interface:TestDescriptor
Remove this descriptor from the hierarchy unless it is a root or contains tests.A concrete
TestEngine
may override this method in order to implement a different algorithm or to skip pruning altogether.
-
logIncompleteFiltering
private void logIncompleteFiltering()
-
warnAboutUnfilterableRunner
private void warnAboutUnfilterableRunner()
-
getFilters
public java.util.Optional<java.util.List<org.junit.runner.manipulation.Filter>> getFilters()
-
clearFilters
public void clearFilters()
-
applyFilters
public void applyFilters(java.util.function.Consumer<RunnerTestDescriptor> childrenCreator)
-
getRunnerToReport
private org.junit.runner.Runner getRunnerToReport()
-
isIgnored
public boolean isIgnored()
-
-