Class TestTemplateTestDescriptor
- java.lang.Object
-
- org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
-
- org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
-
- org.junit.jupiter.engine.descriptor.MethodBasedTestDescriptor
-
- org.junit.jupiter.engine.descriptor.TestTemplateTestDescriptor
-
- All Implemented Interfaces:
Filterable,ResourceLockAware,TestClassAware,Validatable,org.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>,org.junit.platform.engine.TestDescriptor
@API(status=INTERNAL, since="5.0") public class TestTemplateTestDescriptor extends MethodBasedTestDescriptor implements FilterableTestDescriptorfor@TestTemplatemethods.- Since:
- 5.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classTestTemplateTestDescriptor.TestTemplateExecutor-
Nested classes/interfaces inherited from class org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
JupiterTestDescriptor.ExceptionHandlerInvoker<E extends org.junit.jupiter.api.extension.Extension>
-
Nested 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.SkipResult
-
-
Field Summary
Fields Modifier and Type Field Description private DynamicDescendantFilterdynamicDescendantFilterstatic java.lang.StringSEGMENT_TYPE-
Fields inherited from class org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
configuration
-
-
Constructor Summary
Constructors Modifier Constructor Description TestTemplateTestDescriptor(org.junit.platform.engine.UniqueId uniqueId, java.lang.Class<?> testClass, java.lang.reflect.Method templateMethod, java.util.function.Supplier<java.util.List<java.lang.Class<?>>> enclosingInstanceTypes, JupiterConfiguration configuration)privateTestTemplateTestDescriptor(org.junit.platform.engine.UniqueId uniqueId, java.lang.String displayName, java.lang.Class<?> testClass, java.lang.reflect.Method templateMethod, JupiterConfiguration configuration, DynamicDescendantFilter dynamicDescendantFilter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JupiterEngineExecutionContextexecute(JupiterEngineExecutionContext context, org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor dynamicTestExecutor)DynamicDescendantFiltergetDynamicDescendantFilter()org.junit.platform.engine.TestDescriptor.TypegetType()booleanmayRegisterTests()JupiterEngineExecutionContextprepare(JupiterEngineExecutionContext context)Must be overridden and return a new context with a newExtensionContextso cleanUp() does not accidentally close the parent context.protected TestTemplateTestDescriptorwithUniqueId(java.util.function.UnaryOperator<org.junit.platform.engine.UniqueId> uniqueIdTransformer){@return shallow copy (without children) of this descriptor with the supplied unique ID}-
Methods inherited from class org.junit.jupiter.engine.descriptor.MethodBasedTestDescriptor
getEnclosingTestClasses, getExclusiveResourceCollector, getExplicitExecutionMode, getLegacyReportingBaseName, getResourceLocksProviderEvaluator, getTags, getTestClass, getTestMethod, invokeTestWatchers, nodeSkipped, validate
-
Methods inherited from class org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
cleanUp, copyIncludingDescendants, getDefaultChildExecutionMode, getExclusiveResources, getExecutionMode, getExecutionModeFromAnnotation, getLegacyReportingIndex, getLegacyReportingName, getTags, invokeExecutionExceptionHandlers, 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
after, around, before, nodeFinished
-
Methods inherited from interface org.junit.jupiter.engine.descriptor.ResourceLockAware
determineExclusiveResources, determineOwnExclusiveResources
-
Methods inherited from interface org.junit.platform.engine.TestDescriptor
accept, addChild, findByUniqueId, getAncestors, getChildren, getDescendants, getDisplayName, getLegacyReportingName, getParent, getSource, getUniqueId, isContainer, isRoot, isTest, orderChildren, prune, removeChild, removeFromHierarchy, setParent
-
-
-
-
Field Detail
-
SEGMENT_TYPE
public static final java.lang.String SEGMENT_TYPE
- See Also:
- Constant Field Values
-
dynamicDescendantFilter
private final DynamicDescendantFilter dynamicDescendantFilter
-
-
Constructor Detail
-
TestTemplateTestDescriptor
public TestTemplateTestDescriptor(org.junit.platform.engine.UniqueId uniqueId, java.lang.Class<?> testClass, java.lang.reflect.Method templateMethod, java.util.function.Supplier<java.util.List<java.lang.Class<?>>> enclosingInstanceTypes, JupiterConfiguration configuration)
-
TestTemplateTestDescriptor
private TestTemplateTestDescriptor(org.junit.platform.engine.UniqueId uniqueId, java.lang.String displayName, java.lang.Class<?> testClass, java.lang.reflect.Method templateMethod, JupiterConfiguration configuration, DynamicDescendantFilter dynamicDescendantFilter)
-
-
Method Detail
-
withUniqueId
protected TestTemplateTestDescriptor withUniqueId(java.util.function.UnaryOperator<org.junit.platform.engine.UniqueId> uniqueIdTransformer)
Description copied from class:JupiterTestDescriptor{@return shallow copy (without children) of this descriptor with the supplied unique ID}- Specified by:
withUniqueIdin classJupiterTestDescriptor
-
getDynamicDescendantFilter
public DynamicDescendantFilter getDynamicDescendantFilter()
- Specified by:
getDynamicDescendantFilterin interfaceFilterable
-
getType
public org.junit.platform.engine.TestDescriptor.Type getType()
- Specified by:
getTypein interfaceorg.junit.platform.engine.TestDescriptor
-
mayRegisterTests
public boolean mayRegisterTests()
- Specified by:
mayRegisterTestsin interfaceorg.junit.platform.engine.TestDescriptor
-
prepare
public JupiterEngineExecutionContext prepare(JupiterEngineExecutionContext context)
Description copied from class:JupiterTestDescriptorMust be overridden and return a new context with a newExtensionContextso cleanUp() does not accidentally close the parent context.- Specified by:
preparein interfaceorg.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>- Specified by:
preparein classJupiterTestDescriptor
-
execute
public JupiterEngineExecutionContext execute(JupiterEngineExecutionContext context, org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor dynamicTestExecutor) throws java.lang.Exception
- Specified by:
executein interfaceorg.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>- Throws:
java.lang.Exception
-
-