@API(status=INTERNAL, since="5.0") public class TestTemplateTestDescriptor extends MethodBasedTestDescriptor implements Filterable
TestDescriptor
for @TestTemplate
methods.Node.DynamicTestExecutor, Node.ExecutionMode, Node.Invocation<C extends EngineExecutionContext>, Node.SkipResult
TestDescriptor.Type, TestDescriptor.Visitor
configuration
children
Constructor and Description |
---|
TestTemplateTestDescriptor(UniqueId uniqueId,
Class<?> testClass,
Method templateMethod,
JupiterConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
JupiterEngineExecutionContext |
execute(JupiterEngineExecutionContext context,
Node.DynamicTestExecutor dynamicTestExecutor)
Execute the behavior of this node.
|
DynamicDescendantFilter |
getDynamicDescendantFilter() |
TestDescriptor.Type |
getType()
Determine the
TestDescriptor.Type of this descriptor. |
boolean |
mayRegisterTests()
Determine if this descriptor may register dynamic tests during execution.
|
JupiterEngineExecutionContext |
prepare(JupiterEngineExecutionContext context)
Must be overridden and return a new context so cleanUp() does not accidentally close the parent context.
|
getExclusiveResources, getExplicitExecutionMode, getLegacyReportingName, getTags, getTestClass, getTestMethod
cleanUp, executeAndMaskThrowable, getDefaultChildExecutionMode, getExclusiveResourcesFromAnnotation, getExecutionMode, getExecutionModeFromAnnotation, getTags, shouldBeSkipped, toExecutionMode
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
after, around, before, nodeFinished, nodeSkipped
accept, containsTests, getDescendants, isContainer, isRoot, isTest, prune
public TestTemplateTestDescriptor(UniqueId uniqueId, Class<?> testClass, Method templateMethod, JupiterConfiguration configuration)
public DynamicDescendantFilter getDynamicDescendantFilter()
getDynamicDescendantFilter
in interface Filterable
public TestDescriptor.Type getType()
TestDescriptor
TestDescriptor.Type
of this descriptor.getType
in interface TestDescriptor
null
.TestDescriptor.isContainer()
,
TestDescriptor.isTest()
public boolean mayRegisterTests()
TestDescriptor
The default implementation assumes tests are usually known during
discovery and thus returns false
.
mayRegisterTests
in interface TestDescriptor
public JupiterEngineExecutionContext prepare(JupiterEngineExecutionContext context) throws Exception
JupiterTestDescriptor
prepare
in interface Node<JupiterEngineExecutionContext>
prepare
in class JupiterTestDescriptor
Exception
Node.cleanUp(EngineExecutionContext)
public JupiterEngineExecutionContext execute(JupiterEngineExecutionContext context, Node.DynamicTestExecutor dynamicTestExecutor) throws Exception
Node
Containers typically do not implement this method since the
HierarchicalTestEngine
handles execution of their children.
The supplied dynamicTestExecutor
may be used to submit
additional dynamic tests for immediate execution.
The default implementation returns the supplied context
unmodified.
execute
in interface Node<JupiterEngineExecutionContext>
context
- the context to execute indynamicTestExecutor
- the executor to submit dynamic tests toException
Node.before(C)
,
Node.after(C)
Copyright © 2021. All rights reserved.