Module org.junit.jupiter.engine
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:
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 org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor
ClassBasedTestDescriptor.ClassInfo
Nested classes/interfaces inherited from interface org.junit.platform.engine.support.hierarchical.Node
Node.DynamicTestExecutor, Node.ExecutionMode, Node.Invocation<C extends EngineExecutionContext>, Node.SkipResult
Nested classes/interfaces inherited from interface org.junit.platform.engine.TestDescriptor
TestDescriptor.Type, TestDescriptor.Visitor
-
Field Summary
FieldsFields inherited from class org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor
classInfo
Fields inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
children
-
Constructor Summary
ConstructorsConstructorDescriptionNestedClassTestDescriptor
(UniqueId uniqueId, Class<?> testClass, Supplier<List<Class<?>>> enclosingInstanceTypes, JupiterConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptiondefault Stream
<ExclusiveResource> default Stream
<ExclusiveResource> determineOwnExclusiveResources
(Function<ResourceLocksProvider, Set<ResourceLocksProvider.Lock>> providerToLocks) getTags()
Get the set of tags associated with this descriptor.protected TestInstances
instantiateTestClass
(JupiterEngineExecutionContext parentExecutionContext, ExtensionContextSupplier extensionContext, ExtensionRegistry registry, JupiterEngineExecutionContext context) protected NestedClassTestDescriptor
withUniqueId
(UnaryOperator<UniqueId> uniqueIdTransformer) Returns shallow copy (without children) of this descriptor with the supplied unique ID.Methods inherited from class org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor
after, before, cleanUp, getDefaultChildExecutionMode, getExclusiveResourceCollector, getExplicitExecutionMode, getLegacyReportingName, getTestClass, getType, instantiateTestClass, prepare, setDefaultChildExecutionMode, validate, validateClassTemplateInvocationLifecycleMethods, validateCoreLifecycleMethods
Methods inherited from class org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
copyIncludingDescendants, getExclusiveResources, getExecutionMode, shouldBeSkipped, toExecutionMode
Methods inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, orderChildren, removeChild, removeFromHierarchy, setParent, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.junit.platform.engine.support.hierarchical.Node
around, execute, nodeFinished, nodeSkipped
Methods inherited from interface org.junit.platform.engine.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
-
-
Method Details
-
withUniqueId
Description copied from class:JupiterTestDescriptor
Returns shallow copy (without children) of this descriptor with the supplied unique ID.- Specified by:
withUniqueId
in classJupiterTestDescriptor
- Returns:
- shallow copy (without children) of this descriptor with the supplied unique ID
-
getTags
Description copied from interface:TestDescriptor
Get the set of tags associated with this descriptor.- Specified by:
getTags
in interfaceTestDescriptor
- Overrides:
getTags
in classAbstractTestDescriptor
- Returns:
- the set of tags associated with this descriptor; never
null
but potentially empty - See Also:
-
getEnclosingTestClasses
-
getEnclosingTestClasses
-
instantiateTestClass
protected TestInstances instantiateTestClass(JupiterEngineExecutionContext parentExecutionContext, ExtensionContextSupplier extensionContext, ExtensionRegistry registry, JupiterEngineExecutionContext context) - Specified by:
instantiateTestClass
in classClassBasedTestDescriptor
-
getResourceLocksProviderEvaluator
public Function<ResourceLocksProvider,Set<ResourceLocksProvider.Lock>> getResourceLocksProviderEvaluator() -
determineExclusiveResources
-
determineOwnExclusiveResources
default Stream<ExclusiveResource> determineOwnExclusiveResources(Function<ResourceLocksProvider, Set<ResourceLocksProvider.Lock>> providerToLocks)
-