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 ClassBasedTestDescriptor
ClassBasedTestDescriptor.ClassInfoNested 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 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 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, 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 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: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
-
instantiateTestClass
protected TestInstances instantiateTestClass(JupiterEngineExecutionContext parentExecutionContext, ExtensionContextSupplier extensionContext, ExtensionRegistry registry, JupiterEngineExecutionContext context) - Specified by:
instantiateTestClassin classClassBasedTestDescriptor
-
getResourceLocksProviderEvaluator
public Function<ResourceLocksProvider, Set<ResourceLocksProvider.Lock>> getResourceLocksProviderEvaluator() -
determineExclusiveResources
-
determineOwnExclusiveResources
default Stream<ExclusiveResource> determineOwnExclusiveResources(Function<ResourceLocksProvider, Set<ResourceLocksProvider.Lock>> providerToLocks)
-