@API(value=Internal) public class TestTemplateTestDescriptor extends JupiterTestDescriptor
TestDescriptor for @TestTemplate
methods.Node.DynamicTestExecutor, Node.SkipResultTestDescriptor.Type, TestDescriptor.Visitor| Constructor and Description |
|---|
TestTemplateTestDescriptor(UniqueId uniqueId,
Class<?> testClass,
Method templateMethod) |
| Modifier and Type | Method and Description |
|---|---|
JupiterEngineExecutionContext |
execute(JupiterEngineExecutionContext context,
Node.DynamicTestExecutor dynamicTestExecutor)
Execute the behavior of this node.
|
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.
|
Set<TestTag> |
getTags()
Get the set of tags associated with this descriptor.
|
Class<?> |
getTestClass() |
Method |
getTestMethod() |
TestDescriptor.Type |
getType()
Determine the
TestDescriptor.Type of this descriptor. |
boolean |
hasTests()
Determine if this descriptor or any of its descendants describes a test.
|
boolean |
isLeaf()
Determine if this
Node is a leaf in the hierarchy. |
JupiterEngineExecutionContext |
prepare(JupiterEngineExecutionContext context)
Prepare the supplied
context prior to execution. |
Node.SkipResult |
shouldBeSkipped(JupiterEngineExecutionContext context)
Determine if the execution of the supplied
context should be
skipped. |
determineDisplayName, executeAndMaskThrowable, getTags, populateNewExtensionRegistryFromExtendWith, shouldContainerBeSkipped, shouldTestBeSkippedaddChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, setSource, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitafter, before, executeaccept, getDescendants, isContainer, isRoot, isTest, prune, pruneTreepublic TestDescriptor.Type getType()
TestDescriptorTestDescriptor.Type of this descriptor.null.TestDescriptor.isContainer(),
TestDescriptor.isTest()public boolean hasTests()
TestDescriptorThe default implementation returns true if TestDescriptor.isTest()
returns true and otherwise recurses through this descriptor's
children to determine if they have tests.
public boolean isLeaf()
NodeNode is a leaf in the hierarchy.
The default implementation returns false.
isLeaf in interface Node<JupiterEngineExecutionContext>isLeaf in class JupiterTestDescriptorpublic JupiterEngineExecutionContext prepare(JupiterEngineExecutionContext context) throws Exception
Nodecontext prior to execution.
The default implementation returns the supplied context unmodified.
Exceptionpublic Node.SkipResult shouldBeSkipped(JupiterEngineExecutionContext context) throws Exception
Nodecontext should be
skipped.
The default implementation returns Node.SkipResult.doNotSkip().
Exceptionpublic JupiterEngineExecutionContext execute(JupiterEngineExecutionContext context, Node.DynamicTestExecutor dynamicTestExecutor) throws Exception
NodeContainers 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.
context - the context to execute indynamicTestExecutor - the executor to submit dynamic tests toExceptionNode.before(C),
Node.after(C)public final Set<TestTag> getTags()
TestDescriptorgetTags in interface TestDescriptorgetTags in class AbstractTestDescriptornull
but potentially emptyTestTagpublic final Class<?> getTestClass()
public final Method getTestMethod()
public String getLegacyReportingName()
TestDescriptorThe default implementation simply delegates to TestDescriptor.getDisplayName().
null or blank