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

public Class NestedClassTestDescriptor

extends ClassBasedTestDescriptor
Class Inheritance
Annotations
@API
status:INTERNAL
since:5.0
Static Imports
org.apiguardian.api.API.Status.INTERNAL, org.junit.jupiter.engine.descriptor.DisplayNameUtils.createDisplayNameSupplierForNestedClass, .ResourceLockAware.enclosingInstanceTypesDependentResourceLocksProviderEvaluator

TestDescriptor for tests based on nested (but not static) Java classes.

Default Display Names

The default display name for a non-static nested test class is the simple name of the class.

Since
5.0

Field Summary

Modifier and TypeField and Description
public static final String
Inherited from org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor:
classInfo

Constructor Summary

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

private
NestedClassTestDescriptor(UniqueId uniqueId, Class<?> testClass, String displayName, JupiterConfiguration configuration)

Method Summary

Modifier and TypeMethod and Description
public List<Class<?>>
public static List<Class<?>>
public Function<ResourceLocksProvider, Set<ResourceLocksProvider.Lock>>
public final Set<TestTag>
protected TestInstances
protected NestedClassTestDescriptor
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:
afterbeforecleanUpgetDefaultChildExecutionModegetExclusiveResourceCollectorgetExplicitExecutionModegetLegacyReportingNamegetTestClassgetTypeinstantiateTestClasspreparesetDefaultChildExecutionModevalidatevalidateClassTemplateInvocationLifecycleMethodsvalidateCoreLifecycleMethods

Field Detail

SEGMENT_TYPEback to summary
public static final String SEGMENT_TYPE

Constructor Detail

NestedClassTestDescriptorback to summary
public NestedClassTestDescriptor(UniqueId uniqueId, Class<?> testClass, Supplier<List<Class<?>>> enclosingInstanceTypes, JupiterConfiguration configuration)
NestedClassTestDescriptorback to summary
private NestedClassTestDescriptor(UniqueId uniqueId, Class<?> testClass, String displayName, JupiterConfiguration configuration)

Method Detail

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

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

Annotations
@Override
getEnclosingTestClassesback to summary
public static List<Class<?>> getEnclosingTestClasses(@Nullable TestDescriptor parent)
Annotations
@API
status:INTERNAL
since:5.12
getResourceLocksProviderEvaluatorback to summary
public Function<ResourceLocksProvider, Set<ResourceLocksProvider.Lock>> getResourceLocksProviderEvaluator()

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

Annotations
@Override
getTagsback to summary
public final 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
protected TestInstances instantiateTestClass(JupiterEngineExecutionContext parentExecutionContext, ExtensionContextSupplier extensionContext, ExtensionRegistry registry, JupiterEngineExecutionContext context)

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

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