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

public Class ClassTemplateInvocationTestDescriptor

extends JupiterTestDescriptor
implements TestClassAware, ResourceLockAware
Class Inheritance
All Implemented Interfaces
org.junit.jupiter.engine.descriptor.ResourceLockAware, org.junit.platform.engine.TestDescriptor, org.junit.jupiter.engine.descriptor.TestClassAware
Annotations
@API
status:INTERNAL
since:5.13
Static Imports
java.util.Objects.requireNonNull, org.apiguardian.api.API.Status.INTERNAL, org.junit.jupiter.engine.descriptor.CallbackSupport.invokeAfterCallbacks, .CallbackSupport.invokeBeforeCallbacks, org.junit.jupiter.engine.extension.MutableExtensionRegistry.createRegistryFrom, org.junit.jupiter.engine.support.JupiterThrowableCollectorFactory.createThrowableCollector

Since
5.13

Field Summary

Modifier and TypeField and Description
private final int
private @Nullable ClassTemplateInvocationContext
private final ClassTemplateTestDescriptor
public static final String
Inherited from org.junit.jupiter.engine.descriptor.JupiterTestDescriptor:
configuration

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
after(JupiterEngineExecutionContext context)

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

Execute the after behavior of this node.

public JupiterEngineExecutionContext
before(JupiterEngineExecutionContext context)

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

Execute the before behavior of this node.

public void
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 List<Class<?>>
public ExclusiveResourceCollector
public int
public String
getLegacyReportingName()

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

Get the name of this descriptor in a format that is suitable for legacy reporting infrastructure — for example, for reporting systems built on the Ant-based XML reporting format for JUnit 4.

public Function<ResourceLocksProvider, Set<ResourceLocksProvider.Lock>>
public Class<?>
public TestDescriptor.Type
getType()

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

Determine the Type of this descriptor.

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.

private ClassTemplateInvocationContext
public Node.SkipResult
protected ClassTemplateInvocationTestDescriptor
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.JupiterTestDescriptor:
copyIncludingDescendantsgetDefaultChildExecutionModegetExclusiveResourcesgetExecutionModegetExecutionModeFromAnnotationgetExplicitExecutionModegetTagsinvokeExecutionExceptionHandlerstoExecutionMode

Field Detail

indexback to summary
private final int index
invocationContextback to summary
private @Nullable ClassTemplateInvocationContext invocationContext
parentback to summary
private final ClassTemplateTestDescriptor parent

Hides org.junit.platform.engine.support.descriptor.AbstractTestDescriptor.parent.

SEGMENT_TYPEback to summary
public static final String SEGMENT_TYPE

Constructor Detail

ClassTemplateInvocationTestDescriptorback to summary
public ClassTemplateInvocationTestDescriptor(UniqueId uniqueId, ClassTemplateTestDescriptor parent, ClassTemplateInvocationContext invocationContext, int index, @Nullable TestSource source, JupiterConfiguration configuration)

Method Detail

afterback to summary
public void after(JupiterEngineExecutionContext context) throws Exception

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

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

Execute the after behavior of this node.

This method will be called once after execution of this node.

The default implementation does nothing.

Annotations
@Override
beforeback to summary
public JupiterEngineExecutionContext before(JupiterEngineExecutionContext context) throws Exception

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

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

Execute the before behavior of this node.

This method will be called once before execution of this node.

The default implementation returns the supplied context unmodified.

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

Overrides org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.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
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
getEnclosingTestClassesback to summary
public List<Class<?>> getEnclosingTestClasses()

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

Annotations
@Override
getExclusiveResourceCollectorback to summary
public ExclusiveResourceCollector getExclusiveResourceCollector()

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

Annotations
@Override
getIndexback to summary
public int getIndex()
getLegacyReportingNameback to summary
public String getLegacyReportingName()

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

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

Get the name of this descriptor in a format that is suitable for legacy reporting infrastructure — for example, for reporting systems built on the Ant-based XML reporting format for JUnit 4.

The default implementation delegates to getDisplayName().

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

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

Annotations
@Override
getTestClassback to summary
public Class<?> getTestClass()

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

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
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
requiredInvocationContextback to summary
private ClassTemplateInvocationContext requiredInvocationContext()
shouldBeSkippedback to summary
public Node.SkipResult shouldBeSkipped(JupiterEngineExecutionContext context)

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

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

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

Determine if the execution of the supplied context should be skipped.

The default implementation returns SkipResult#doNotSkip().

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