Class MethodBasedTestDescriptor
- java.lang.Object
-
- org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
-
- org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
-
- org.junit.jupiter.engine.descriptor.MethodBasedTestDescriptor
-
- All Implemented Interfaces:
Node<JupiterEngineExecutionContext>
,TestDescriptor
- Direct Known Subclasses:
TestMethodTestDescriptor
,TestTemplateTestDescriptor
@API(status=INTERNAL, since="5.0") public abstract class MethodBasedTestDescriptor extends JupiterTestDescriptor
Base class forTestDescriptors
based on Java methods.- Since:
- 5.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.junit.platform.engine.support.hierarchical.Node
Node.DynamicTestExecutor, Node.ExecutionMode, Node.Invocation<C extends EngineExecutionContext>, Node.SkipResult
-
Nested classes/interfaces inherited from interface org.junit.platform.engine.TestDescriptor
TestDescriptor.Type, TestDescriptor.Visitor
-
-
Field Summary
-
Fields inherited from class org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
configuration
-
Fields inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
children
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<ExclusiveResource>
getExclusiveResources()
Get the set of exclusive resources required to execute this node.protected Optional<Node.ExecutionMode>
getExplicitExecutionMode()
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.Set<TestTag>
getTags()
Get the set of tags associated with this descriptor.Class<?>
getTestClass()
Method
getTestMethod()
-
Methods inherited from class org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
cleanUp, executeAndMaskThrowable, getDefaultChildExecutionMode, getExclusiveResourcesFromAnnotation, getExecutionMode, getExecutionModeFromAnnotation, getTags, prepare, shouldBeSkipped, toExecutionMode
-
Methods inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, removeFromHierarchy, 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.support.hierarchical.Node
after, around, before, execute
-
Methods inherited from interface org.junit.platform.engine.TestDescriptor
accept, getDescendants, getType, isContainer, isRoot, isTest, mayRegisterTests, prune
-
-
-
-
Method Detail
-
getTags
public final 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
-
getExclusiveResources
public Set<ExclusiveResource> getExclusiveResources()
Description copied from interface:Node
Get the set of exclusive resources required to execute this node.The default implementation returns an empty set.
- Returns:
- the set of exclusive resources required by this node; never
null
but potentially empty - See Also:
ExclusiveResource
-
getExplicitExecutionMode
protected Optional<Node.ExecutionMode> getExplicitExecutionMode()
- Overrides:
getExplicitExecutionMode
in classJupiterTestDescriptor
-
getTestClass
public final Class<?> getTestClass()
-
getTestMethod
public final Method getTestMethod()
-
getLegacyReportingName
public 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 simply delegates to
TestDescriptor.getDisplayName()
.- Returns:
- the legacy reporting name; never
null
or blank
-
-