Class NestedClassTestDescriptor
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.NestedClassTestDescriptor
- All Implemented Interfaces:
ResourceLockAware, TestClassAware, Validatable, Node<JupiterEngineExecutionContext>, TestDescriptor
@API(status=INTERNAL,
since="5.0")
public class NestedClassTestDescriptor
extends ClassBasedTestDescriptor
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
-
Nested Class Summary
Nested classes/interfaces inherited from class ClassBasedTestDescriptor
ClassBasedTestDescriptor.ClassInfoNested classes/interfaces inherited from class JupiterTestDescriptor
JupiterTestDescriptor.ExceptionHandlerInvoker<E>Nested classes/interfaces inherited from interface Node
Node.DynamicTestExecutor, Node.ExecutionMode, Node.Invocation<C>, Node.SkipResultNested classes/interfaces inherited from interface TestDescriptor
TestDescriptor.Type, TestDescriptor.Visitor -
Field Summary
FieldsFields inherited from class ClassBasedTestDescriptor
classInfoFields inherited from class JupiterTestDescriptor
configurationFields inherited from class AbstractTestDescriptor
children -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateNestedClassTestDescriptor(UniqueId uniqueId, Class<?> testClass, String displayName, JupiterConfiguration configuration) NestedClassTestDescriptor(UniqueId uniqueId, Class<?> testClass, Supplier<List<Class<?>>> enclosingInstanceTypes, JupiterConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionFunction<org.junit.jupiter.api.parallel.ResourceLocksProvider, Set<org.junit.jupiter.api.parallel.ResourceLocksProvider.Lock>> getTags()Get the set of tags associated with this descriptor.protected org.junit.jupiter.api.extension.TestInstancesinstantiateTestClass(JupiterEngineExecutionContext parentExecutionContext, ExtensionContextSupplier extensionContext, ExtensionRegistry registry, JupiterEngineExecutionContext context) protected NestedClassTestDescriptorwithUniqueId(UnaryOperator<UniqueId> uniqueIdTransformer) Returns shallow copy (without children) of this descriptor with the supplied unique ID.Methods inherited from class ClassBasedTestDescriptor
after, before, cleanUp, getDefaultChildExecutionMode, getExclusiveResourceCollector, getExplicitExecutionMode, getLegacyReportingName, getTestClass, getType, instantiateTestClass, prepare, setDefaultChildExecutionMode, validate, validateClassTemplateInvocationLifecycleMethods, validateCoreLifecycleMethodsMethods inherited from class JupiterTestDescriptor
copyIncludingDescendants, getExclusiveResources, getExecutionMode, getExecutionModeFromAnnotation, getTags, invokeExecutionExceptionHandlers, shouldBeSkipped, toExecutionModeMethods inherited from class AbstractTestDescriptor
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, orderChildren, removeChild, removeFromHierarchy, setParent, toStringMethods inherited from interface Node
around, execute, nodeFinished, nodeSkippedMethods inherited from interface ResourceLockAware
determineExclusiveResources, determineOwnExclusiveResourcesMethods inherited from interface TestDescriptor
accept, addChild, findByUniqueId, getAncestors, getChildren, getDescendants, getDisplayName, getParent, getSource, getUniqueId, isContainer, isRoot, isTest, mayRegisterTests, orderChildren, prune, removeChild, removeFromHierarchy, setParent
-
Field Details
-
SEGMENT_TYPE
- See Also:
-
-
Constructor Details
-
NestedClassTestDescriptor
-
NestedClassTestDescriptor
private NestedClassTestDescriptor(UniqueId uniqueId, Class<?> testClass, String displayName, JupiterConfiguration configuration)
-
-
Method Details
-
withUniqueId
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
-
getTags
Description copied from interface:TestDescriptorGet the set of tags associated with this descriptor.- Specified by:
getTagsin interfaceTestDescriptor- Overrides:
getTagsin classAbstractTestDescriptor- Returns:
- the set of tags associated with this descriptor; never
nullbut potentially empty - See Also:
-
getEnclosingTestClasses
-
getEnclosingTestClasses
@API(status=INTERNAL, since="5.12") public static List<Class<?>> getEnclosingTestClasses(TestDescriptor parent) -
instantiateTestClass
protected org.junit.jupiter.api.extension.TestInstances instantiateTestClass(JupiterEngineExecutionContext parentExecutionContext, ExtensionContextSupplier extensionContext, ExtensionRegistry registry, JupiterEngineExecutionContext context) - Specified by:
instantiateTestClassin classClassBasedTestDescriptor
-
getResourceLocksProviderEvaluator
-