@API(status=INTERNAL,
since="5.0")
public class TestTemplateTestDescriptor
extends MethodBasedTestDescriptor
TestDescriptor for @TestTemplate
methods.Node.DynamicTestExecutor, Node.SkipResultTestDescriptor.Type, TestDescriptor.Visitorchildren| Constructor and Description |
|---|
TestTemplateTestDescriptor(UniqueId uniqueId,
java.lang.Class<?> testClass,
java.lang.reflect.Method templateMethod) |
| Modifier and Type | Method and Description |
|---|---|
private TestDescriptor |
createInvocationTestDescriptor(TestTemplateInvocationContext invocationContext,
int index) |
JupiterEngineExecutionContext |
execute(JupiterEngineExecutionContext context,
Node.DynamicTestExecutor dynamicTestExecutor)
Execute the behavior of this node.
|
private void |
execute(Node.DynamicTestExecutor dynamicTestExecutor,
TestDescriptor testDescriptor) |
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)
Prepare the supplied
context prior to execution. |
private java.util.List<TestTemplateInvocationContextProvider> |
validateProviders(ExtensionContext extensionContext,
ExtensionRegistry extensionRegistry) |
private void |
validateWasAtLeastInvokedOnce(int invocationIndex) |
getLegacyReportingName, getTags, getTestClass, getTestMethoddetermineDisplayName, executeAndMaskThrowable, getTags, populateNewExtensionRegistryFromExtendWith, 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 TestTemplateTestDescriptor(UniqueId uniqueId, java.lang.Class<?> testClass, java.lang.reflect.Method templateMethod)
public TestDescriptor.Type getType()
TestDescriptorTestDescriptor.Type of this descriptor.null.TestDescriptor.isContainer(),
TestDescriptor.isTest()public boolean mayRegisterTests()
TestDescriptorThe default implementation assumes tests are usually known during
discovery and thus returns false.
public JupiterEngineExecutionContext prepare(JupiterEngineExecutionContext context) throws java.lang.Exception
Nodecontext prior to execution.
The default implementation returns the supplied context unmodified.
java.lang.Exceptionpublic JupiterEngineExecutionContext execute(JupiterEngineExecutionContext context, Node.DynamicTestExecutor dynamicTestExecutor) throws java.lang.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 tojava.lang.ExceptionNode.before(C),
Node.after(C)private java.util.List<TestTemplateInvocationContextProvider> validateProviders(ExtensionContext extensionContext, ExtensionRegistry extensionRegistry)
private TestDescriptor createInvocationTestDescriptor(TestTemplateInvocationContext invocationContext, int index)
private void execute(Node.DynamicTestExecutor dynamicTestExecutor, TestDescriptor testDescriptor)
private void validateWasAtLeastInvokedOnce(int invocationIndex)