Class ClassTemplateTestDescriptor
java.lang.Object
org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor
org.junit.jupiter.engine.descriptor.ClassTemplateTestDescriptor
- All Implemented Interfaces:
Filterable, ResourceLockAware, TestClassAware, Validatable, org.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>, org.junit.platform.engine.TestDescriptor
@API(status=INTERNAL,
since="5.13")
public class ClassTemplateTestDescriptor
extends ClassBasedTestDescriptor
implements Filterable
- Since:
- 5.13
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classNested classes/interfaces inherited from class ClassBasedTestDescriptor
ClassBasedTestDescriptor.ClassInfoNested 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 List<org.junit.platform.engine.TestDescriptor> private final Map<Integer, Collection<? extends org.junit.platform.engine.TestDescriptor>> private final ClassBasedTestDescriptorprivate final DynamicDescendantFilterstatic final Stringstatic final StringFields inherited from class ClassBasedTestDescriptor
classInfoFields inherited from class JupiterTestDescriptor
configurationFields inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
children -
Constructor Summary
ConstructorsModifierConstructorDescriptionClassTemplateTestDescriptor(org.junit.platform.engine.UniqueId uniqueId, ClassBasedTestDescriptor delegate) privateClassTemplateTestDescriptor(org.junit.platform.engine.UniqueId uniqueId, ClassBasedTestDescriptor delegate, DynamicDescendantFilter dynamicDescendantFilter) -
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.execute(JupiterEngineExecutionContext context, org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor dynamicTestExecutor) Set<org.junit.platform.engine.support.hierarchical.ExclusiveResource> Function<org.junit.jupiter.api.parallel.ResourceLocksProvider, Set<org.junit.jupiter.api.parallel.ResourceLocksProvider.Lock>> Set<org.junit.platform.engine.TestTag> getTags()org.junit.jupiter.api.extension.TestInstancesinstantiateTestClass(JupiterEngineExecutionContext parentExecutionContext, ExtensionContextSupplier extensionContext, ExtensionRegistry registry, JupiterEngineExecutionContext context) booleanvoidprune()protected voidvalidateClassTemplateInvocationLifecycleMethods(org.junit.platform.engine.support.discovery.DiscoveryIssueReporter reporter) protected voidvalidateCoreLifecycleMethods(org.junit.platform.engine.support.discovery.DiscoveryIssueReporter reporter) protected ClassTemplateTestDescriptorwithUniqueId(UnaryOperator<org.junit.platform.engine.UniqueId> uniqueIdTransformer) Returns shallow copy (without children) of this descriptor with the supplied unique ID.Methods inherited from class ClassBasedTestDescriptor
after, before, getDefaultChildExecutionMode, getExclusiveResourceCollector, getExplicitExecutionMode, getLegacyReportingBaseName, getTestClass, getType, instantiateTestClass, prepare, setDefaultChildExecutionMode, validateMethods inherited from class JupiterTestDescriptor
getExecutionMode, getExecutionModeFromAnnotation, getLegacyReportingIndex, getLegacyReportingName, getTags, invokeExecutionExceptionHandlers, shouldBeSkipped, toExecutionModeMethods inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, 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, getUniqueId, isContainer, isRoot, isTest, orderChildren, removeChild, removeFromHierarchy, setParent
-
Field Details
-
STANDALONE_CLASS_SEGMENT_TYPE
- See Also:
-
NESTED_CLASS_SEGMENT_TYPE
- See Also:
-
childrenPrototypesByIndex
private final Map<Integer, Collection<? extends org.junit.platform.engine.TestDescriptor>> childrenPrototypesByIndex -
childrenPrototypes
-
delegate
-
dynamicDescendantFilter
-
-
Constructor Details
-
ClassTemplateTestDescriptor
public ClassTemplateTestDescriptor(org.junit.platform.engine.UniqueId uniqueId, ClassBasedTestDescriptor delegate) -
ClassTemplateTestDescriptor
private ClassTemplateTestDescriptor(org.junit.platform.engine.UniqueId uniqueId, ClassBasedTestDescriptor delegate, DynamicDescendantFilter dynamicDescendantFilter)
-
-
Method Details
-
getTags
- Specified by:
getTagsin interfaceorg.junit.platform.engine.TestDescriptor- Overrides:
getTagsin classorg.junit.platform.engine.support.descriptor.AbstractTestDescriptor
-
validateCoreLifecycleMethods
protected void validateCoreLifecycleMethods(org.junit.platform.engine.support.discovery.DiscoveryIssueReporter reporter) - Overrides:
validateCoreLifecycleMethodsin classClassBasedTestDescriptor
-
validateClassTemplateInvocationLifecycleMethods
protected void validateClassTemplateInvocationLifecycleMethods(org.junit.platform.engine.support.discovery.DiscoveryIssueReporter reporter) - Overrides:
validateClassTemplateInvocationLifecycleMethodsin classClassBasedTestDescriptor
-
getDynamicDescendantFilter
- Specified by:
getDynamicDescendantFilterin interfaceFilterable
-
copyIncludingDescendants
protected JupiterTestDescriptor copyIncludingDescendants(UnaryOperator<org.junit.platform.engine.UniqueId> uniqueIdTransformer) Description copied from class:JupiterTestDescriptorReturns a deep copy (with copies of children) of this descriptor with the supplied unique ID.- Overrides:
copyIncludingDescendantsin classJupiterTestDescriptor- Returns:
- a deep copy (with copies of children) of this descriptor with the supplied unique ID
-
withUniqueId
protected ClassTemplateTestDescriptor 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
-
prune
public void prune()- Specified by:
prunein interfaceorg.junit.platform.engine.TestDescriptor
-
mayRegisterTests
public boolean mayRegisterTests()- Specified by:
mayRegisterTestsin interfaceorg.junit.platform.engine.TestDescriptor
-
getEnclosingTestClasses
- Specified by:
getEnclosingTestClassesin interfaceTestClassAware
-
instantiateTestClass
public org.junit.jupiter.api.extension.TestInstances instantiateTestClass(JupiterEngineExecutionContext parentExecutionContext, ExtensionContextSupplier extensionContext, ExtensionRegistry registry, JupiterEngineExecutionContext context) - Specified by:
instantiateTestClassin classClassBasedTestDescriptor
-
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
-
cleanUp
- Specified by:
cleanUpin interfaceorg.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>- Overrides:
cleanUpin classClassBasedTestDescriptor- 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
-