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,org.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>,org.junit.platform.engine.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.ClassInfoNested classes/interfaces inherited from interface org.junit.platform.engine.support.hierarchical.Node
org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor, org.junit.platform.engine.support.hierarchical.Node.ExecutionMode, org.junit.platform.engine.support.hierarchical.Node.Invocation<C extends org.junit.platform.engine.support.hierarchical.EngineExecutionContext>, org.junit.platform.engine.support.hierarchical.Node.SkipResultNested classes/interfaces inherited from interface org.junit.platform.engine.TestDescriptor
org.junit.platform.engine.TestDescriptor.Type, org.junit.platform.engine.TestDescriptor.Visitor -
Field Summary
FieldsFields inherited from class org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor
classInfoFields inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
children -
Constructor Summary
ConstructorsConstructorDescriptionNestedClassTestDescriptor(org.junit.platform.engine.UniqueId uniqueId, Class<?> testClass, Supplier<List<Class<?>>> enclosingInstanceTypes, JupiterConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptiondefault Stream<org.junit.platform.engine.support.hierarchical.ExclusiveResource> default Stream<org.junit.platform.engine.support.hierarchical.ExclusiveResource> determineOwnExclusiveResources(Function<org.junit.jupiter.api.parallel.ResourceLocksProvider, Set<org.junit.jupiter.api.parallel.ResourceLocksProvider.Lock>> providerToLocks) getEnclosingTestClasses(org.junit.platform.engine.TestDescriptor parent) Function<org.junit.jupiter.api.parallel.ResourceLocksProvider, Set<org.junit.jupiter.api.parallel.ResourceLocksProvider.Lock>> final Set<org.junit.platform.engine.TestTag> getTags()protected org.junit.jupiter.api.extension.TestInstancesinstantiateTestClass(JupiterEngineExecutionContext parentExecutionContext, ExtensionContextSupplier extensionContext, ExtensionRegistry registry, JupiterEngineExecutionContext context) protected NestedClassTestDescriptorwithUniqueId(UnaryOperator<org.junit.platform.engine.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, validateCoreLifecycleMethodsMethods inherited from class org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
copyIncludingDescendants, getExclusiveResources, getExecutionMode, shouldBeSkipped, toExecutionModeMethods inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, orderChildren, removeChild, removeFromHierarchy, setParent, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.junit.platform.engine.support.hierarchical.Node
around, execute, nodeFinished, nodeSkippedMethods 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
public NestedClassTestDescriptor(org.junit.platform.engine.UniqueId uniqueId, Class<?> testClass, Supplier<List<Class<?>>> enclosingInstanceTypes, JupiterConfiguration configuration)
-
-
Method Details
-
withUniqueId
protected NestedClassTestDescriptor withUniqueId(UnaryOperator<org.junit.platform.engine.UniqueId> uniqueIdTransformer) 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
- Specified by:
getTagsin interfaceorg.junit.platform.engine.TestDescriptor- Overrides:
getTagsin classorg.junit.platform.engine.support.descriptor.AbstractTestDescriptor
-
getEnclosingTestClasses
-
getEnclosingTestClasses
-
instantiateTestClass
protected org.junit.jupiter.api.extension.TestInstances instantiateTestClass(JupiterEngineExecutionContext parentExecutionContext, ExtensionContextSupplier extensionContext, ExtensionRegistry registry, JupiterEngineExecutionContext context) - Specified by:
instantiateTestClassin classClassBasedTestDescriptor
-
getResourceLocksProviderEvaluator
-
determineExclusiveResources
default Stream<org.junit.platform.engine.support.hierarchical.ExclusiveResource> determineExclusiveResources() -
determineOwnExclusiveResources
-