Class JupiterTestDescriptor
java.lang.Object
org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
- All Implemented Interfaces:
Node<JupiterEngineExecutionContext>,TestDescriptor
- Direct Known Subclasses:
ClassBasedTestDescriptor,ClassTemplateInvocationTestDescriptor,MethodBasedTestDescriptor
@API(status=INTERNAL,
since="5.0")
public abstract class JupiterTestDescriptor
extends AbstractTestDescriptor
implements Node<JupiterEngineExecutionContext>
- 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.SkipResultNested classes/interfaces inherited from interface org.junit.platform.engine.TestDescriptor
TestDescriptor.Type, TestDescriptor.Visitor -
Field Summary
Fields inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
children -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanUp(JupiterEngineExecutionContext context) Clean up the suppliedcontextafter execution.protected JupiterTestDescriptorcopyIncludingDescendants(UnaryOperator<UniqueId> uniqueIdTransformer) Returns a deep copy (with copies of children) of this descriptor with the supplied unique ID.Get the set of exclusive resources required to execute this node.Get the preferred of execution mode for parallel execution of this node.abstract JupiterEngineExecutionContextprepare(JupiterEngineExecutionContext context) Must be overridden and return a new context with a newExtensionContextso cleanUp() does not accidentally close the parent context.Determine if the execution of the suppliedcontextshould be skipped.static Node.ExecutionModetoExecutionMode(ExecutionMode mode) protected abstract JupiterTestDescriptorwithUniqueId(UnaryOperator<UniqueId> uniqueIdTransformer) Returns shallow copy (without children) of this descriptor with the supplied unique ID.Methods inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getTags, getUniqueId, hashCode, orderChildren, removeChild, removeFromHierarchy, setParent, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.junit.platform.engine.support.hierarchical.Node
after, around, before, execute, nodeFinished, nodeSkippedMethods inherited from interface org.junit.platform.engine.TestDescriptor
accept, getAncestors, getDescendants, getLegacyReportingName, getType, isContainer, isRoot, isTest, mayRegisterTests, prune
-
Method Details
-
getExecutionMode
Description copied from interface:NodeGet the preferred of execution mode for parallel execution of this node.The default implementation returns
Node.ExecutionMode.CONCURRENT.- Specified by:
getExecutionModein interfaceNode<JupiterEngineExecutionContext>- Returns:
- the preferred execution mode of this node; never
null - See Also:
-
toExecutionMode
-
getExclusiveResources
Description copied from interface:NodeGet the set of exclusive resources required to execute this node.The default implementation returns an empty set.
- Specified by:
getExclusiveResourcesin interfaceNode<JupiterEngineExecutionContext>- Returns:
- the set of exclusive resources required by this node; never
nullbut potentially empty - See Also:
-
shouldBeSkipped
Description copied from interface:NodeDetermine if the execution of the suppliedcontextshould be skipped.The default implementation returns
Node.SkipResult.doNotSkip().- Specified by:
shouldBeSkippedin interfaceNode<JupiterEngineExecutionContext>
-
prepare
public abstract JupiterEngineExecutionContext prepare(JupiterEngineExecutionContext context) throws Exception Must be overridden and return a new context with a newExtensionContextso cleanUp() does not accidentally close the parent context.- Specified by:
preparein interfaceNode<JupiterEngineExecutionContext>- Throws:
Exception- See Also:
-
cleanUp
Description copied from interface:NodeClean up the suppliedcontextafter execution.The default implementation does nothing.
- Specified by:
cleanUpin interfaceNode<JupiterEngineExecutionContext>- Parameters:
context- the context to execute in- Throws:
Exception- See Also:
-
copyIncludingDescendants
protected JupiterTestDescriptor copyIncludingDescendants(UnaryOperator<UniqueId> uniqueIdTransformer) Returns a deep copy (with copies of children) of this descriptor with the supplied unique ID.- Returns:
- a deep copy (with copies of children) of this descriptor with the supplied unique ID
-
withUniqueId
Returns shallow copy (without children) of this descriptor with the supplied unique ID.- Returns:
- shallow copy (without children) of this descriptor with the supplied unique ID
-