Class ClassTemplateTestDescriptor
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.ClassTemplateTestDescriptor
- All Implemented Interfaces:
Filterable,TestClassAware,Validatable,org.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>,org.junit.platform.engine.TestDescriptor
@API(status=INTERNAL,
since="5.13")
public class ClassTemplateTestDescriptor
extends ClassBasedTestDescriptor
implements Filterable
- Since:
- 5.13
-
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
ConstructorsConstructorDescriptionClassTemplateTestDescriptor(org.junit.platform.engine.UniqueId uniqueId, ClassBasedTestDescriptor delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanUp(JupiterEngineExecutionContext context) protected JupiterTestDescriptorcopyIncludingDescendants(UnaryOperator<org.junit.platform.engine.UniqueId> uniqueIdTransformer) Returns a deep copy (with copies of children) of this descriptor with the supplied unique ID.default 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) execute(JupiterEngineExecutionContext context, org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor dynamicTestExecutor) Set<org.junit.platform.engine.support.hierarchical.ExclusiveResource> Function<org.junit.jupiter.api.parallel.ResourceLocksProvider, Set<org.junit.jupiter.api.parallel.ResourceLocksProvider.Lock>> Set<org.junit.platform.engine.TestTag> getTags()org.junit.jupiter.api.extension.TestInstancesinstantiateTestClass(JupiterEngineExecutionContext parentExecutionContext, ExtensionContextSupplier extensionContext, ExtensionRegistry registry, JupiterEngineExecutionContext context) booleanvoidprune()protected voidvalidateClassTemplateInvocationLifecycleMethods(org.junit.platform.engine.support.discovery.DiscoveryIssueReporter reporter) protected voidvalidateCoreLifecycleMethods(org.junit.platform.engine.support.discovery.DiscoveryIssueReporter reporter) protected ClassTemplateTestDescriptorwithUniqueId(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, getDefaultChildExecutionMode, getExclusiveResourceCollector, getExplicitExecutionMode, getLegacyReportingName, getTestClass, getType, instantiateTestClass, prepare, setDefaultChildExecutionMode, validateMethods inherited from class org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
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, nodeFinished, nodeSkippedMethods inherited from interface org.junit.platform.engine.TestDescriptor
accept, addChild, findByUniqueId, getAncestors, getChildren, getDescendants, getDisplayName, getParent, getSource, getUniqueId, isContainer, isRoot, isTest, orderChildren, removeChild, removeFromHierarchy, setParent
-
Field Details
-
STANDALONE_CLASS_SEGMENT_TYPE
- See Also:
-
NESTED_CLASS_SEGMENT_TYPE
- See Also:
-
-
Constructor Details
-
ClassTemplateTestDescriptor
public ClassTemplateTestDescriptor(org.junit.platform.engine.UniqueId uniqueId, ClassBasedTestDescriptor delegate)
-
-
Method Details
-
getTags
- Specified by:
getTagsin interfaceorg.junit.platform.engine.TestDescriptor- Overrides:
getTagsin classorg.junit.platform.engine.support.descriptor.AbstractTestDescriptor
-
validateCoreLifecycleMethods
protected void validateCoreLifecycleMethods(org.junit.platform.engine.support.discovery.DiscoveryIssueReporter reporter) - Overrides:
validateCoreLifecycleMethodsin classClassBasedTestDescriptor
-
validateClassTemplateInvocationLifecycleMethods
protected void validateClassTemplateInvocationLifecycleMethods(org.junit.platform.engine.support.discovery.DiscoveryIssueReporter reporter) - Overrides:
validateClassTemplateInvocationLifecycleMethodsin classClassBasedTestDescriptor
-
getDynamicDescendantFilter
- Specified by:
getDynamicDescendantFilterin interfaceFilterable
-
copyIncludingDescendants
protected JupiterTestDescriptor copyIncludingDescendants(UnaryOperator<org.junit.platform.engine.UniqueId> uniqueIdTransformer) Description copied from class:JupiterTestDescriptorReturns a deep copy (with copies of children) of this descriptor with the supplied unique ID.- Overrides:
copyIncludingDescendantsin classJupiterTestDescriptor- Returns:
- a deep copy (with copies of children) of this descriptor with the supplied unique ID
-
withUniqueId
protected ClassTemplateTestDescriptor 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
-
prune
public void prune()- Specified by:
prunein interfaceorg.junit.platform.engine.TestDescriptor
-
mayRegisterTests
public boolean mayRegisterTests()- Specified by:
mayRegisterTestsin interfaceorg.junit.platform.engine.TestDescriptor
-
getEnclosingTestClasses
- Specified by:
getEnclosingTestClassesin interfaceTestClassAware
-
instantiateTestClass
public org.junit.jupiter.api.extension.TestInstances instantiateTestClass(JupiterEngineExecutionContext parentExecutionContext, ExtensionContextSupplier extensionContext, ExtensionRegistry registry, JupiterEngineExecutionContext context) - Specified by:
instantiateTestClassin classClassBasedTestDescriptor
-
getResourceLocksProviderEvaluator
-
getExclusiveResources
public Set<org.junit.platform.engine.support.hierarchical.ExclusiveResource> getExclusiveResources()- Specified by:
getExclusiveResourcesin interfaceorg.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>- Overrides:
getExclusiveResourcesin classJupiterTestDescriptor
-
cleanUp
- Specified by:
cleanUpin interfaceorg.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>- Overrides:
cleanUpin classClassBasedTestDescriptor- Throws:
Exception
-
execute
public JupiterEngineExecutionContext execute(JupiterEngineExecutionContext context, org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor dynamicTestExecutor) throws Exception - Specified by:
executein interfaceorg.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>- Throws:
Exception
-
determineExclusiveResources
default Stream<org.junit.platform.engine.support.hierarchical.ExclusiveResource> determineExclusiveResources() -
determineOwnExclusiveResources
-