Top Inners Fields Constructors Methods
org.junit.jupiter.engine.descriptor

public Class ClassTemplateTestDescriptor

extends ClassBasedTestDescriptor
implements Filterable
Class Inheritance
All Implemented Interfaces
org.junit.jupiter.engine.descriptor.Filterable
Annotations
@API
status:INTERNAL
since:5.13
Static Imports
java.util.stream.Collectors.toCollection, org.apiguardian.api.API.Status.INTERNAL, org.junit.jupiter.api.TestInstance.Lifecycle.PER_METHOD, org.junit.jupiter.engine.descriptor.LifecycleMethodUtils.validateClassTemplateInvocationLifecycleMethodsAreDeclaredCorrectly

Since
5.13

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
private final List<TestDescriptor>
private final Map<Integer, Collection<? extends TestDescriptor>>
private final ClassBasedTestDescriptor
private final DynamicDescendantFilter
public static final String
public static final String
Inherited from org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor:
classInfo

Constructor Summary

AccessConstructor and Description
public
private

Method Summary

Modifier and TypeMethod and Description
public void
protected JupiterTestDescriptor
copyIncludingDescendants(UnaryOperator<UniqueId> uniqueIdTransformer)

Overrides org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.copyIncludingDescendants.

Returns a deep copy (with copies of children) of this descriptor with the supplied unique ID.

public JupiterEngineExecutionContext
execute(JupiterEngineExecutionContext context, Node.DynamicTestExecutor dynamicTestExecutor)

Overrides default org.junit.platform.engine.support.hierarchical.Node.execute.

Execute the behavior of this node.

public DynamicDescendantFilter
public List<Class<?>>
public Set<ExclusiveResource>
public Function<ResourceLocksProvider, Set<ResourceLocksProvider.Lock>>
public Set<TestTag>
public TestInstances
public boolean
mayRegisterTests()

Overrides default org.junit.platform.engine.TestDescriptor.mayRegisterTests.

Determine if this descriptor may register dynamic tests during execution.

public void
prune()

Overrides default org.junit.platform.engine.TestDescriptor.prune.

Remove this descriptor from the hierarchy unless it is a root or contains tests.

protected void
protected void
protected ClassTemplateTestDescriptor
withUniqueId(UnaryOperator<UniqueId> uniqueIdTransformer)

Implements abstract org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.withUniqueId.

Returns shallow copy (without children) of this descriptor with the supplied unique ID.

Inherited from org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor:
afterbeforegetDefaultChildExecutionModegetExclusiveResourceCollectorgetExplicitExecutionModegetLegacyReportingNamegetTestClassgetTypeinstantiateTestClasspreparesetDefaultChildExecutionModevalidate

Field Detail

childrenPrototypesback to summary
private final List<TestDescriptor> childrenPrototypes
childrenPrototypesByIndexback to summary
private final Map<Integer, Collection<? extends TestDescriptor>> childrenPrototypesByIndex
delegateback to summary
private final ClassBasedTestDescriptor delegate
dynamicDescendantFilterback to summary
private final DynamicDescendantFilter dynamicDescendantFilter
NESTED_CLASS_SEGMENT_TYPEback to summary
public static final String NESTED_CLASS_SEGMENT_TYPE
STANDALONE_CLASS_SEGMENT_TYPEback to summary
public static final String STANDALONE_CLASS_SEGMENT_TYPE

Constructor Detail

ClassTemplateTestDescriptorback to summary
public ClassTemplateTestDescriptor(UniqueId uniqueId, ClassBasedTestDescriptor delegate)
ClassTemplateTestDescriptorback to summary
private ClassTemplateTestDescriptor(UniqueId uniqueId, ClassBasedTestDescriptor delegate, DynamicDescendantFilter dynamicDescendantFilter)

Method Detail

cleanUpback to summary
public void cleanUp(JupiterEngineExecutionContext context) throws Exception

Overrides org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.cleanUp.

Overrides default org.junit.platform.engine.support.hierarchical.Node.cleanUp.

Doc from org.junit.platform.engine.support.hierarchical.Node.cleanUp.

Clean up the supplied context after execution.

The default implementation does nothing.

Annotations
@Override
copyIncludingDescendantsback to summary
protected JupiterTestDescriptor copyIncludingDescendants(UnaryOperator<UniqueId> uniqueIdTransformer)

Overrides org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.copyIncludingDescendants.

Doc from org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.copyIncludingDescendants.

Returns a deep copy (with copies of children) of this descriptor with the supplied unique ID.

Annotations
@Override
executeback to summary
public JupiterEngineExecutionContext execute(JupiterEngineExecutionContext context, Node.DynamicTestExecutor dynamicTestExecutor) throws Exception

Overrides default org.junit.platform.engine.support.hierarchical.Node.execute.

Doc from org.junit.platform.engine.support.hierarchical.Node.execute.

Execute the behavior of this node.

Containers typically do not implement this method since the HierarchicalTestEngine handles execution of their children.

The supplied dynamicTestExecutor may be used to submit additional dynamic tests for immediate execution.

The default implementation returns the supplied context unmodified.

Annotations
@Override
getDynamicDescendantFilterback to summary
public DynamicDescendantFilter getDynamicDescendantFilter()

Implements org.junit.jupiter.engine.descriptor.Filterable.getDynamicDescendantFilter.

Annotations
@Override
getEnclosingTestClassesback to summary
public List<Class<?>> getEnclosingTestClasses()

Implements org.junit.jupiter.engine.descriptor.TestClassAware.getEnclosingTestClasses.

Annotations
@Override
getExclusiveResourcesback to summary
public Set<ExclusiveResource> getExclusiveResources()

Overrides org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.getExclusiveResources.

Overrides default org.junit.platform.engine.support.hierarchical.Node.getExclusiveResources.

Doc from org.junit.platform.engine.support.hierarchical.Node.getExclusiveResources.

Get the set of exclusive resources required to execute this node.

The default implementation returns an empty set.

Annotations
@Override
getResourceLocksProviderEvaluatorback to summary
public Function<ResourceLocksProvider, Set<ResourceLocksProvider.Lock>> getResourceLocksProviderEvaluator()

Implements org.junit.jupiter.engine.descriptor.ResourceLockAware.getResourceLocksProviderEvaluator.

Annotations
@Override
getTagsback to summary
public Set<TestTag> getTags()

Overrides org.junit.platform.engine.support.descriptor.AbstractTestDescriptor.getTags.

Implements org.junit.platform.engine.TestDescriptor.getTags.

Doc from org.junit.platform.engine.TestDescriptor.getTags.

Get the set of tags associated with this descriptor.

Annotations
@Override
instantiateTestClassback to summary
public TestInstances instantiateTestClass(JupiterEngineExecutionContext parentExecutionContext, ExtensionContextSupplier extensionContext, ExtensionRegistry registry, JupiterEngineExecutionContext context)

Implements abstract org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateTestClass.

Annotations
@Override
mayRegisterTestsback to summary
public boolean mayRegisterTests()

Overrides default org.junit.platform.engine.TestDescriptor.mayRegisterTests.

Doc from org.junit.platform.engine.TestDescriptor.mayRegisterTests.

Determine if this descriptor may register dynamic tests during execution.

The default implementation assumes tests are usually known during discovery and thus returns false.

Annotations
@Override
pruneback to summary
public void prune()

Overrides default org.junit.platform.engine.TestDescriptor.prune.

Doc from org.junit.platform.engine.TestDescriptor.prune.

Remove this descriptor from the hierarchy unless it is a root or contains tests.

A concrete TestEngine may override this method in order to implement a different algorithm or to skip pruning altogether.

Annotations
@Override
validateClassTemplateInvocationLifecycleMethodsback to summary
protected void validateClassTemplateInvocationLifecycleMethods(DiscoveryIssueReporter reporter)

Overrides org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.validateClassTemplateInvocationLifecycleMethods.

Annotations
@Override
validateCoreLifecycleMethodsback to summary
protected void validateCoreLifecycleMethods(DiscoveryIssueReporter reporter)

Overrides org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.validateCoreLifecycleMethods.

Annotations
@Override
withUniqueIdback to summary
protected ClassTemplateTestDescriptor withUniqueId(UnaryOperator<UniqueId> uniqueIdTransformer)

Implements abstract org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.withUniqueId.

Doc from org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.withUniqueId.

Returns shallow copy (without children) of this descriptor with the supplied unique ID.

Annotations
@Override
org.junit.jupiter.engine.descriptor back to summary

pack-priv Class ClassTemplateTestDescriptor.ClassTemplateExecutor

extends TemplateExecutor<ClassTemplateInvocationContextProvider, ClassTemplateInvocationContext>
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private Stream<? extends TestDescriptor>
collectChildren(int index, UniqueId invocationUniqueId)

pack-priv TestDescriptor
pack-priv UniqueId
protected String
protected String
pack-priv boolean
pack-priv Stream<? extends ClassTemplateInvocationContext>
pack-priv boolean
Inherited from org.junit.jupiter.engine.descriptor.TemplateExecutor:
execute

Constructor Detail

ClassTemplateExecutorback to summary
pack-priv ClassTemplateExecutor()

Method Detail

collectChildrenback to summary
private Stream<? extends TestDescriptor> collectChildren(int index, UniqueId invocationUniqueId)
createInvocationTestDescriptorback to summary
pack-priv TestDescriptor createInvocationTestDescriptor(UniqueId uniqueId, ClassTemplateInvocationContext invocationContext, int index)

Implements abstract org.junit.jupiter.engine.descriptor.TemplateExecutor.createInvocationTestDescriptor.

Annotations
@Override
createInvocationUniqueIdback to summary
pack-priv UniqueId createInvocationUniqueId(UniqueId parentUniqueId, int index)

Implements abstract org.junit.jupiter.engine.descriptor.TemplateExecutor.createInvocationUniqueId.

Annotations
@Override
getNoRegisteredProviderErrorMessageback to summary
protected String getNoRegisteredProviderErrorMessage()

Implements abstract org.junit.jupiter.engine.descriptor.TemplateExecutor.getNoRegisteredProviderErrorMessage.

Annotations
@Override
getZeroContextsProvidedErrorMessageback to summary
protected String getZeroContextsProvidedErrorMessage(ClassTemplateInvocationContextProvider provider)

Implements abstract org.junit.jupiter.engine.descriptor.TemplateExecutor.getZeroContextsProvidedErrorMessage.

Annotations
@Override
mayReturnZeroContextsback to summary
pack-priv boolean mayReturnZeroContexts(ClassTemplateInvocationContextProvider provider, ExtensionContext extensionContext)

Implements abstract org.junit.jupiter.engine.descriptor.TemplateExecutor.mayReturnZeroContexts.

Annotations
@Override
provideContextsback to summary
pack-priv Stream<? extends ClassTemplateInvocationContext> provideContexts(ClassTemplateInvocationContextProvider provider, ExtensionContext extensionContext)

Implements abstract org.junit.jupiter.engine.descriptor.TemplateExecutor.provideContexts.

Annotations
@Override
supportsback to summary
pack-priv boolean supports(ClassTemplateInvocationContextProvider provider, ExtensionContext extensionContext)

Implements abstract org.junit.jupiter.engine.descriptor.TemplateExecutor.supports.

Annotations
@Override