Class JupiterTestDescriptor
java.lang.Object
org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
- All Implemented Interfaces:
org.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>,org.junit.platform.engine.TestDescriptor
- Direct Known Subclasses:
ClassBasedTestDescriptor,ClassTemplateInvocationTestDescriptor,MethodBasedTestDescriptor
@API(status=INTERNAL,
since="5.0")
public abstract class JupiterTestDescriptor
extends org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
implements org.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>
- Since:
- 5.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.junit.platform.engine.support.hierarchical.Node
org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor, org.junit.platform.engine.support.hierarchical.Node.ExecutionMode, org.junit.platform.engine.support.hierarchical.Node.Invocation<C extends org.junit.platform.engine.support.hierarchical.EngineExecutionContext>, org.junit.platform.engine.support.hierarchical.Node.SkipResultNested classes/interfaces inherited from interface org.junit.platform.engine.TestDescriptor
org.junit.platform.engine.TestDescriptor.Type, org.junit.platform.engine.TestDescriptor.Visitor -
Field Summary
Fields inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
children -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanUp(JupiterEngineExecutionContext context) protected JupiterTestDescriptorcopyIncludingDescendants(UnaryOperator<org.junit.platform.engine.UniqueId> uniqueIdTransformer) Returns a deep copy (with copies of children) of this descriptor with the supplied unique ID.Set<org.junit.platform.engine.support.hierarchical.ExclusiveResource> org.junit.platform.engine.support.hierarchical.Node.ExecutionModeabstract JupiterEngineExecutionContextprepare(JupiterEngineExecutionContext context) Must be overridden and return a new context with a newExtensionContextso cleanUp() does not accidentally close the parent context.org.junit.platform.engine.support.hierarchical.Node.SkipResultstatic org.junit.platform.engine.support.hierarchical.Node.ExecutionModetoExecutionMode(org.junit.jupiter.api.parallel.ExecutionMode mode) protected abstract JupiterTestDescriptorwithUniqueId(UnaryOperator<org.junit.platform.engine.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
public org.junit.platform.engine.support.hierarchical.Node.ExecutionMode getExecutionMode()- Specified by:
getExecutionModein interfaceorg.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>
-
toExecutionMode
public static org.junit.platform.engine.support.hierarchical.Node.ExecutionMode toExecutionMode(org.junit.jupiter.api.parallel.ExecutionMode mode) -
getExclusiveResources
public Set<org.junit.platform.engine.support.hierarchical.ExclusiveResource> getExclusiveResources()- Specified by:
getExclusiveResourcesin interfaceorg.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>
-
shouldBeSkipped
public org.junit.platform.engine.support.hierarchical.Node.SkipResult shouldBeSkipped(JupiterEngineExecutionContext context) - Specified by:
shouldBeSkippedin interfaceorg.junit.platform.engine.support.hierarchical.Node<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 interfaceorg.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>- Throws:
Exception
-
cleanUp
- Specified by:
cleanUpin interfaceorg.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>- Throws:
Exception
-
copyIncludingDescendants
protected JupiterTestDescriptor copyIncludingDescendants(UnaryOperator<org.junit.platform.engine.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
protected abstract JupiterTestDescriptor withUniqueId(UnaryOperator<org.junit.platform.engine.UniqueId> uniqueIdTransformer) 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
-