@API(status=INTERNAL,
since="5.0")
public abstract class MethodBasedTestDescriptor
extends JupiterTestDescriptor
TestDescriptors based on Java methods.JupiterTestDescriptor.ExceptionHandlerInvoker<E extends Extension>Node.DynamicTestExecutor, Node.ExecutionMode, Node.Invocation<C extends EngineExecutionContext>, Node.SkipResultTestDescriptor.Type, TestDescriptor.Visitor| Modifier and Type | Field and Description |
|---|---|
private static Logger |
logger |
private java.util.Set<TestTag> |
tags
Set of method-level tags; does not contain tags from parent.
|
private java.lang.Class<?> |
testClass |
private java.lang.reflect.Method |
testMethod |
configurationchildren| Constructor and Description |
|---|
MethodBasedTestDescriptor(UniqueId uniqueId,
java.lang.Class<?> testClass,
java.lang.reflect.Method testMethod,
JupiterConfiguration configuration) |
MethodBasedTestDescriptor(UniqueId uniqueId,
java.lang.String displayName,
java.lang.Class<?> testClass,
java.lang.reflect.Method testMethod,
JupiterConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<ExclusiveResource> |
getExclusiveResources()
Get the set of exclusive resources
required to execute this node.
|
protected java.util.Optional<Node.ExecutionMode> |
getExplicitExecutionMode() |
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() |
protected void |
invokeTestWatchers(JupiterEngineExecutionContext context,
boolean reverseOrder,
java.util.function.Consumer<TestWatcher> callback) |
void |
nodeSkipped(JupiterEngineExecutionContext context,
TestDescriptor descriptor,
Node.SkipResult result)
Invoke
TestWatcher.testDisabled(ExtensionContext, Optional) on each
registered TestWatcher, in registration order. |
cleanUp, getDefaultChildExecutionMode, getExclusiveResourcesFromAnnotation, getExecutionMode, getExecutionModeFromAnnotation, getTags, invokeExecutionExceptionHandlers, prepare, shouldBeSkipped, toExecutionModeaddChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitafter, around, before, execute, nodeFinishedaccept, containsTests, getAncestors, getDescendants, getType, isContainer, isRoot, isTest, mayRegisterTests, pruneprivate static final Logger logger
private final java.lang.Class<?> testClass
private final java.lang.reflect.Method testMethod
private final java.util.Set<TestTag> tags
MethodBasedTestDescriptor(UniqueId uniqueId, java.lang.Class<?> testClass, java.lang.reflect.Method testMethod, JupiterConfiguration configuration)
MethodBasedTestDescriptor(UniqueId uniqueId, java.lang.String displayName, java.lang.Class<?> testClass, java.lang.reflect.Method testMethod, JupiterConfiguration configuration)
public final java.util.Set<TestTag> getTags()
TestDescriptorgetTags in interface TestDescriptorgetTags in class AbstractTestDescriptornull
but potentially emptyTestTagpublic java.util.Set<ExclusiveResource> getExclusiveResources()
NodeThe default implementation returns an empty set.
null but potentially emptyExclusiveResourceprotected java.util.Optional<Node.ExecutionMode> getExplicitExecutionMode()
getExplicitExecutionMode in class JupiterTestDescriptorpublic final java.lang.Class<?> getTestClass()
public final java.lang.reflect.Method getTestMethod()
public java.lang.String getLegacyReportingName()
TestDescriptorThe default implementation delegates to TestDescriptor.getDisplayName().
null or blankpublic void nodeSkipped(JupiterEngineExecutionContext context, TestDescriptor descriptor, Node.SkipResult result)
TestWatcher.testDisabled(ExtensionContext, Optional) on each
registered TestWatcher, in registration order.context - the execution contextdescriptor - the test descriptor that was skippedresult - the result of skipped executionprotected void invokeTestWatchers(JupiterEngineExecutionContext context, boolean reverseOrder, java.util.function.Consumer<TestWatcher> callback)