Filterable
, Node<JupiterEngineExecutionContext>
, TestDescriptor
@API(status=INTERNAL, since="5.0") public class TestTemplateTestDescriptor extends JupiterTestDescriptor implements Filterable
TestDescriptor
for @TestTemplate
methods.Node.DynamicTestExecutor, Node.SkipResult
TestDescriptor.Type, TestDescriptor.Visitor
children
Constructor | Description |
---|---|
TestTemplateTestDescriptor(UniqueId uniqueId,
java.lang.Class<?> testClass,
java.lang.reflect.Method templateMethod) |
Modifier and Type | Method | Description |
---|---|---|
JupiterEngineExecutionContext |
execute(JupiterEngineExecutionContext context,
Node.DynamicTestExecutor dynamicTestExecutor) |
Execute the behavior of this node.
|
DynamicDescendantFilter |
getDynamicDescendantFilter() |
|
java.lang.String |
getLegacyReportingName() |
Get the name of this descriptor in a format that is suitable for legacy
reporting infrastructure — for example, for reporting systems built
on the Ant-based XML reporting format for JUnit 4.
|
java.util.Set<TestTag> |
getTags() |
Get the set of tags associated with this descriptor.
|
java.lang.Class<?> |
getTestClass() |
|
java.lang.reflect.Method |
getTestMethod() |
|
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.
|
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, toString
cleanUp, determineDisplayName, executeAndMaskThrowable, getTags, shouldBeSkipped
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
accept, containsTests, getDescendants, isContainer, isRoot, isTest, prune
public TestTemplateTestDescriptor(UniqueId uniqueId, java.lang.Class<?> testClass, java.lang.reflect.Method templateMethod)
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 java.lang.Exception
JupiterTestDescriptor
prepare
in interface Node<JupiterEngineExecutionContext>
prepare
in class JupiterTestDescriptor
java.lang.Exception
Node.cleanUp(EngineExecutionContext)
public JupiterEngineExecutionContext execute(JupiterEngineExecutionContext context, Node.DynamicTestExecutor dynamicTestExecutor) throws java.lang.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.
execute
in interface Node<JupiterEngineExecutionContext>
context
- the context to execute indynamicTestExecutor
- the executor to submit dynamic tests tojava.lang.Exception
Node.before(C)
,
Node.after(C)
public final java.util.Set<TestTag> getTags()
TestDescriptor
getTags
in interface TestDescriptor
getTags
in class AbstractTestDescriptor
null
but potentially emptyTestTag
public final java.lang.Class<?> getTestClass()
public final java.lang.reflect.Method getTestMethod()
public java.lang.String getLegacyReportingName()
TestDescriptor
The default implementation simply delegates to TestDescriptor.getDisplayName()
.
null
or blank