Module org.junit.jupiter.engine
Class MethodBasedTestDescriptor
java.lang.Object
org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
org.junit.jupiter.engine.descriptor.MethodBasedTestDescriptor
- All Implemented Interfaces:
Node<JupiterEngineExecutionContext>,TestDescriptor
- Direct Known Subclasses:
TestMethodTestDescriptor,TestTemplateTestDescriptor
@API(status=INTERNAL,
since="5.0")
public abstract class MethodBasedTestDescriptor
extends JupiterTestDescriptor
Base class for
TestDescriptors based on Java methods.- Since:
- 5.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.junit.platform.engine.support.hierarchical.Node
Node.DynamicTestExecutor, Node.ExecutionMode, Node.Invocation<C extends EngineExecutionContext>, Node.SkipResultNested classes/interfaces inherited from interface org.junit.platform.engine.TestDescriptor
TestDescriptor.Type, TestDescriptor.Visitor -
Field Summary
Fields inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
children -
Method Summary
Modifier and TypeMethodDescriptiondefault Stream<ExclusiveResource> default Stream<ExclusiveResource> determineOwnExclusiveResources(Function<ResourceLocksProvider, Set<ResourceLocksProvider.Lock>> providerToLocks) org.junit.jupiter.engine.descriptor.ExclusiveResourceCollectorprotected Optional<Node.ExecutionMode> 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.getTags()Get the set of tags associated with this descriptor.final Class<?> final Methodprotected voidinvokeTestWatchers(JupiterEngineExecutionContext context, boolean reverseOrder, Consumer<TestWatcher> callback) voidnodeSkipped(JupiterEngineExecutionContext context, TestDescriptor descriptor, Node.SkipResult result) InvokeTestWatcher.testDisabled(ExtensionContext, Optional)on each registeredTestWatcher, in registration order.Methods inherited from class org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
cleanUp, getExclusiveResources, getExecutionMode, prepare, shouldBeSkipped, toExecutionModeMethods inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.junit.platform.engine.support.hierarchical.Node
after, around, before, execute, nodeFinishedMethods inherited from interface org.junit.platform.engine.TestDescriptor
accept, addChild, findByUniqueId, getAncestors, getChildren, getDescendants, getDisplayName, getParent, getSource, getType, getUniqueId, isContainer, isRoot, isTest, mayRegisterTests, prune, removeChild, removeFromHierarchy, setParent
-
Method Details
-
getTags
Description copied from interface:TestDescriptorGet the set of tags associated with this descriptor.- Specified by:
getTagsin interfaceTestDescriptor- Overrides:
getTagsin classAbstractTestDescriptor- Returns:
- the set of tags associated with this descriptor; never
nullbut potentially empty - See Also:
-
getExclusiveResourceCollector
public org.junit.jupiter.engine.descriptor.ExclusiveResourceCollector getExclusiveResourceCollector() -
getResourceLocksProviderEvaluator
public Function<ResourceLocksProvider,Set<ResourceLocksProvider.Lock>> getResourceLocksProviderEvaluator() -
getExplicitExecutionMode
-
getTestClass
-
getTestMethod
-
getLegacyReportingName
Description copied from interface:TestDescriptorGet 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.The default implementation delegates to
TestDescriptor.getDisplayName().- Specified by:
getLegacyReportingNamein interfaceTestDescriptor- Returns:
- the legacy reporting name; never
nullor blank
-
nodeSkipped
public void nodeSkipped(JupiterEngineExecutionContext context, TestDescriptor descriptor, Node.SkipResult result) InvokeTestWatcher.testDisabled(ExtensionContext, Optional)on each registeredTestWatcher, in registration order.- Specified by:
nodeSkippedin interfaceNode<JupiterEngineExecutionContext>- Parameters:
context- the execution contextdescriptor- the test descriptor that was skippedresult- the result of skipped execution- Since:
- 5.4
-
invokeTestWatchers
protected void invokeTestWatchers(JupiterEngineExecutionContext context, boolean reverseOrder, Consumer<TestWatcher> callback) - Since:
- 5.4
-
determineExclusiveResources
-
determineOwnExclusiveResources
default Stream<ExclusiveResource> determineOwnExclusiveResources(Function<ResourceLocksProvider, Set<ResourceLocksProvider.Lock>> providerToLocks)
-