Class ClassTemplateInvocationTestDescriptor
java.lang.Object
org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
org.junit.jupiter.engine.descriptor.ClassTemplateInvocationTestDescriptor
- All Implemented Interfaces:
ResourceLockAware, TestClassAware, org.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>, org.junit.platform.engine.TestDescriptor
@API(status=INTERNAL,
since="5.13")
public class ClassTemplateInvocationTestDescriptor
extends JupiterTestDescriptor
implements TestClassAware, ResourceLockAware
- Since:
- 5.13
-
Nested Class Summary
Nested classes/interfaces inherited from class JupiterTestDescriptor
JupiterTestDescriptor.ExceptionHandlerInvoker<E>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>, 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
FieldsModifier and TypeFieldDescriptionprivate final intprivate org.junit.jupiter.api.extension.ClassTemplateInvocationContextprivate final ClassTemplateTestDescriptorstatic final StringFields inherited from class JupiterTestDescriptor
configurationFields inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
children -
Constructor Summary
ConstructorsConstructorDescriptionClassTemplateInvocationTestDescriptor(org.junit.platform.engine.UniqueId uniqueId, ClassTemplateTestDescriptor parent, org.junit.jupiter.api.extension.ClassTemplateInvocationContext invocationContext, int index, org.junit.platform.engine.TestSource source, JupiterConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionvoidafter(JupiterEngineExecutionContext context) before(JupiterEngineExecutionContext context) voidcleanUp(JupiterEngineExecutionContext context) execute(JupiterEngineExecutionContext context, org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor dynamicTestExecutor) Set<org.junit.platform.engine.support.hierarchical.ExclusiveResource> intgetIndex()protected Stringprotected OptionalIntFunction<org.junit.jupiter.api.parallel.ResourceLocksProvider, Set<org.junit.jupiter.api.parallel.ResourceLocksProvider.Lock>> Class<?> org.junit.platform.engine.TestDescriptor.TypegetType()prepare(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.SkipResultprotected ClassTemplateInvocationTestDescriptorwithUniqueId(UnaryOperator<org.junit.platform.engine.UniqueId> uniqueIdTransformer) Returns shallow copy (without children) of this descriptor with the supplied unique ID.Methods inherited from class JupiterTestDescriptor
copyIncludingDescendants, getDefaultChildExecutionMode, getExecutionMode, getExecutionModeFromAnnotation, getExplicitExecutionMode, getLegacyReportingName, getTags, invokeExecutionExceptionHandlers, toExecutionModeMethods 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 interface org.junit.platform.engine.support.hierarchical.Node
around, nodeFinished, nodeSkippedMethods inherited from interface ResourceLockAware
determineExclusiveResources, determineOwnExclusiveResourcesMethods inherited from interface org.junit.platform.engine.TestDescriptor
accept, addChild, findByUniqueId, getAncestors, getChildren, getDescendants, getDisplayName, getLegacyReportingName, getParent, getSource, getTags, getUniqueId, isContainer, isRoot, isTest, mayRegisterTests, orderChildren, prune, removeChild, removeFromHierarchy, setParent
-
Field Details
-
SEGMENT_TYPE
- See Also:
-
parent
-
invocationContext
private org.junit.jupiter.api.extension.ClassTemplateInvocationContext invocationContext -
index
private final int index
-
-
Constructor Details
-
ClassTemplateInvocationTestDescriptor
public ClassTemplateInvocationTestDescriptor(org.junit.platform.engine.UniqueId uniqueId, ClassTemplateTestDescriptor parent, org.junit.jupiter.api.extension.ClassTemplateInvocationContext invocationContext, int index, org.junit.platform.engine.TestSource source, JupiterConfiguration configuration)
-
-
Method Details
-
getIndex
public int getIndex() -
withUniqueId
protected ClassTemplateInvocationTestDescriptor withUniqueId(UnaryOperator<org.junit.platform.engine.UniqueId> uniqueIdTransformer) Description copied from class:JupiterTestDescriptorReturns shallow copy (without children) of this descriptor with the supplied unique ID.- Specified by:
withUniqueIdin classJupiterTestDescriptor- Returns:
- shallow copy (without children) of this descriptor with the supplied unique ID
-
getType
public org.junit.platform.engine.TestDescriptor.Type getType()- Specified by:
getTypein interfaceorg.junit.platform.engine.TestDescriptor
-
getLegacyReportingBaseName
- Overrides:
getLegacyReportingBaseNamein classJupiterTestDescriptor
-
getLegacyReportingIndex
- Overrides:
getLegacyReportingIndexin classJupiterTestDescriptor
-
getTestClass
- Specified by:
getTestClassin interfaceTestClassAware
-
getEnclosingTestClasses
- Specified by:
getEnclosingTestClassesin interfaceTestClassAware
-
getExclusiveResourceCollector
- Specified by:
getExclusiveResourceCollectorin interfaceResourceLockAware
-
getResourceLocksProviderEvaluator
public Function<org.junit.jupiter.api.parallel.ResourceLocksProvider, Set<org.junit.jupiter.api.parallel.ResourceLocksProvider.Lock>> getResourceLocksProviderEvaluator()- Specified by:
getResourceLocksProviderEvaluatorin interfaceResourceLockAware
-
getExclusiveResources
public Set<org.junit.platform.engine.support.hierarchical.ExclusiveResource> getExclusiveResources()- Specified by:
getExclusiveResourcesin interfaceorg.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>- Overrides:
getExclusiveResourcesin classJupiterTestDescriptor
-
prepare
Description copied from class:JupiterTestDescriptorMust 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>- Specified by:
preparein classJupiterTestDescriptor
-
shouldBeSkipped
public org.junit.platform.engine.support.hierarchical.Node.SkipResult shouldBeSkipped(JupiterEngineExecutionContext context) - Specified by:
shouldBeSkippedin interfaceorg.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>- Overrides:
shouldBeSkippedin classJupiterTestDescriptor
-
before
- Specified by:
beforein interfaceorg.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>- Throws:
Exception
-
execute
public JupiterEngineExecutionContext execute(JupiterEngineExecutionContext context, org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor dynamicTestExecutor) throws Exception - Specified by:
executein interfaceorg.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>- Throws:
Exception
-
after
- Specified by:
afterin interfaceorg.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>- Throws:
Exception
-
cleanUp
- Specified by:
cleanUpin interfaceorg.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>- Overrides:
cleanUpin classJupiterTestDescriptor- Throws:
Exception
-