@API(status=INTERNAL,
since="5.0")
public class TestTemplateTestDescriptor
extends JupiterTestDescriptor
implements Filterable
TestDescriptor for @TestTemplate
methods.Node.DynamicTestExecutor, Node.SkipResultTestDescriptor.Type, TestDescriptor.Visitorchildren| 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.
|
DynamicDescendantFilter |
getDynamicDescendantFilter() |
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 |
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.
|
cleanUp, determineDisplayName, executeAndMaskThrowable, getTags, shouldBeSkippedaddChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaccept, containsTests, getDescendants, isContainer, isRoot, isTest, prunepublic DynamicDescendantFilter getDynamicDescendantFilter()
getDynamicDescendantFilter in interface Filterablepublic TestDescriptor.Type getType()
TestDescriptorTestDescriptor.Type of this descriptor.getType in interface TestDescriptornull.TestDescriptor.isContainer(),
TestDescriptor.isTest()public boolean mayRegisterTests()
TestDescriptorThe default implementation assumes tests are usually known during
discovery and thus returns false.
mayRegisterTests in interface TestDescriptorpublic JupiterEngineExecutionContext prepare(JupiterEngineExecutionContext context) throws Exception
JupiterTestDescriptorprepare in interface Node<JupiterEngineExecutionContext>prepare in class JupiterTestDescriptorExceptionNode.cleanUp(EngineExecutionContext)public 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.
execute in interface Node<JupiterEngineExecutionContext>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 blankCopyright © 2020. All rights reserved.