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

public Class TestTemplateTestDescriptor

extends MethodBasedTestDescriptor
implements Filterable
Class Inheritance
All Implemented Interfaces
org.junit.jupiter.engine.descriptor.Filterable
Annotations
@API
status:INTERNAL
since:5.0
Static Imports
org.apiguardian.api.API.Status.INTERNAL, org.junit.jupiter.engine.descriptor.ExtensionUtils.populateNewExtensionRegistryFromExtendWithAnnotation

TestDescriptor for @TestTemplate methods.
Since
5.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final DynamicDescendantFilter
public static final String

Constructor Summary

AccessConstructor and Description
public
TestTemplateTestDescriptor(UniqueId uniqueId, Class<?> testClass, Method templateMethod, Supplier<List<Class<?>>> enclosingInstanceTypes, JupiterConfiguration configuration)

private
TestTemplateTestDescriptor(UniqueId uniqueId, String displayName, Class<?> testClass, Method templateMethod, JupiterConfiguration configuration, DynamicDescendantFilter dynamicDescendantFilter)

Method Summary

Modifier and TypeMethod and Description
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 TestDescriptor.Type
getType()

Implements org.junit.platform.engine.TestDescriptor.getType.

Determine the Type of this descriptor.

public boolean
mayRegisterTests()

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

Determine if this descriptor may register dynamic tests during execution.

public JupiterEngineExecutionContext
prepare(JupiterEngineExecutionContext context)

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

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

Must be overridden and return a new context with a new ExtensionContext so cleanUp() does not accidentally close the parent context.

protected TestTemplateTestDescriptor
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.MethodBasedTestDescriptor:
getEnclosingTestClassesgetExclusiveResourceCollectorgetExplicitExecutionModegetLegacyReportingNamegetResourceLocksProviderEvaluatorgetTagsgetTestClassgetTestMethodinvokeTestWatchersnodeSkippedvalidate

Field Detail

dynamicDescendantFilterback to summary
private final DynamicDescendantFilter dynamicDescendantFilter
SEGMENT_TYPEback to summary
public static final String SEGMENT_TYPE

Constructor Detail

TestTemplateTestDescriptorback to summary
public TestTemplateTestDescriptor(UniqueId uniqueId, Class<?> testClass, Method templateMethod, Supplier<List<Class<?>>> enclosingInstanceTypes, JupiterConfiguration configuration)
TestTemplateTestDescriptorback to summary
private TestTemplateTestDescriptor(UniqueId uniqueId, String displayName, Class<?> testClass, Method templateMethod, JupiterConfiguration configuration, DynamicDescendantFilter dynamicDescendantFilter)

Method Detail

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
getTypeback to summary
public TestDescriptor.Type getType()

Implements org.junit.platform.engine.TestDescriptor.getType.

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

Determine the Type of this descriptor.

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
prepareback to summary
public JupiterEngineExecutionContext prepare(JupiterEngineExecutionContext context)

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

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

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

Must be overridden and return a new context with a new ExtensionContext so cleanUp() does not accidentally close the parent context.

Annotations
@Override
withUniqueIdback to summary
protected TestTemplateTestDescriptor 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

private Class TestTemplateTestDescriptor.TestTemplateExecutor

extends TemplateExecutor<TestTemplateInvocationContextProvider, TestTemplateInvocationContext>
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

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

Constructor Detail

TestTemplateExecutorback to summary
pack-priv TestTemplateExecutor()

Method Detail

createInvocationTestDescriptorback to summary
pack-priv TestDescriptor createInvocationTestDescriptor(UniqueId uniqueId, TestTemplateInvocationContext 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(TestTemplateInvocationContextProvider provider)

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

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

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

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

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

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

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

Annotations
@Override