Class VintageTestDescriptor
- java.lang.Object
-
- org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
-
- org.junit.vintage.engine.descriptor.VintageTestDescriptor
-
- All Implemented Interfaces:
TestDescriptor
- Direct Known Subclasses:
RunnerTestDescriptor
@API(status=INTERNAL, since="4.12") public class VintageTestDescriptor extends AbstractTestDescriptor
- Since:
- 4.12
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.junit.platform.engine.TestDescriptor
TestDescriptor.Type, TestDescriptor.Visitor
-
-
Field Summary
Fields Modifier and Type Field Description static String
ENGINE_ID
static String
SEGMENT_TYPE_DYNAMIC
static String
SEGMENT_TYPE_RUNNER
static String
SEGMENT_TYPE_TEST
-
Fields inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
children
-
-
Constructor Summary
Constructors Constructor Description VintageTestDescriptor(UniqueId uniqueId, org.junit.runner.Description description)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canBeRemovedFromHierarchy()
org.junit.runner.Description
getDescription()
Set<TestTag>
getTags()
Get the set of tags associated with this descriptor.TestDescriptor.Type
getType()
Determine theTestDescriptor.Type
of this descriptor.void
removeFromHierarchy()
Remove this non-root descriptor from its parent and remove all the children from this descriptor.protected boolean
tryToExcludeFromRunner(org.junit.runner.Description description)
-
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, getDescendants, getLegacyReportingName, isContainer, isRoot, isTest, mayRegisterTests, prune
-
-
-
-
Field Detail
-
ENGINE_ID
public static final String ENGINE_ID
- See Also:
- Constant Field Values
-
SEGMENT_TYPE_RUNNER
public static final String SEGMENT_TYPE_RUNNER
- See Also:
- Constant Field Values
-
SEGMENT_TYPE_TEST
public static final String SEGMENT_TYPE_TEST
- See Also:
- Constant Field Values
-
SEGMENT_TYPE_DYNAMIC
public static final String SEGMENT_TYPE_DYNAMIC
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VintageTestDescriptor
public VintageTestDescriptor(UniqueId uniqueId, org.junit.runner.Description description)
-
-
Method Detail
-
getDescription
public org.junit.runner.Description getDescription()
-
getType
public TestDescriptor.Type getType()
Description copied from interface:TestDescriptor
Determine theTestDescriptor.Type
of this descriptor.- Returns:
- the descriptor type; never
null
. - See Also:
TestDescriptor.isContainer()
,TestDescriptor.isTest()
-
getTags
public Set<TestTag> getTags()
Description copied from interface:TestDescriptor
Get the set of tags associated with this descriptor.- Specified by:
getTags
in interfaceTestDescriptor
- Overrides:
getTags
in classAbstractTestDescriptor
- Returns:
- the set of tags associated with this descriptor; never
null
but potentially empty - See Also:
TestTag
-
removeFromHierarchy
public void removeFromHierarchy()
Description copied from interface:TestDescriptor
Remove this non-root descriptor from its parent and remove all the children from this descriptor.If this method is invoked on a root descriptor, this method must throw a
JUnitException
explaining that a root cannot be removed from the hierarchy.- Specified by:
removeFromHierarchy
in interfaceTestDescriptor
- Overrides:
removeFromHierarchy
in classAbstractTestDescriptor
-
canBeRemovedFromHierarchy
protected boolean canBeRemovedFromHierarchy()
-
tryToExcludeFromRunner
protected boolean tryToExcludeFromRunner(org.junit.runner.Description description)
-
-