Top Description Inners Fields Constructors Methods
org.junit.jupiter.engine.descriptor

public abstract Class MethodBasedTestDescriptor

extends JupiterTestDescriptor
implements ResourceLockAware, TestClassAware, Validatable
Class Inheritance
All Implemented Interfaces
org.junit.jupiter.engine.descriptor.Validatable, org.junit.jupiter.engine.descriptor.TestClassAware, org.junit.jupiter.engine.descriptor.ResourceLockAware, org.junit.platform.engine.TestDescriptor
Known Direct Subclasses
org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor, org.junit.jupiter.engine.descriptor.TestTemplateTestDescriptor
Annotations
@API
status:INTERNAL
since:5.0
Static Imports
org.apiguardian.api.API.Status.INTERNAL, org.junit.jupiter.api.parallel.ResourceLockTarget.CHILDREN, org.junit.jupiter.engine.descriptor.DisplayNameUtils.determineDisplayNameForMethod, .ResourceLockAware.enclosingInstanceTypesDependentResourceLocksProviderEvaluator, org.junit.platform.commons.util.CollectionUtils.forEachInReverseOrder

Base class for TestDescriptors based on Java methods.
Since
5.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final Logger
private final MethodBasedTestDescriptor.MethodInfo
Inherited from org.junit.jupiter.engine.descriptor.JupiterTestDescriptor:
configuration

Constructor Summary

AccessConstructor and Description
pack-priv
MethodBasedTestDescriptor(UniqueId uniqueId, Class<?> testClass, Method testMethod, Supplier<List<Class<?>>> enclosingInstanceTypes, JupiterConfiguration configuration)

pack-priv
MethodBasedTestDescriptor(UniqueId uniqueId, String displayName, Class<?> testClass, Method testMethod, JupiterConfiguration configuration)

Method Summary

Modifier and TypeMethod and Description
public List<Class<?>>
public ExclusiveResourceCollector
protected Optional<Node.ExecutionMode>
public String
getLegacyReportingName()

Overrides default org.junit.platform.engine.TestDescriptor.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.

public Function<ResourceLocksProvider, Set<ResourceLocksProvider.Lock>>
public final Set<TestTag>
public final Class<?>
public final Method
protected void
invokeTestWatchers(JupiterEngineExecutionContext context, boolean reverseOrder, Consumer<TestWatcher> callback)

public void
public void
validate(DiscoveryIssueReporter reporter)

Implements org.junit.jupiter.engine.descriptor.Validatable.validate.

Validate the state of this descriptor and report any issues found to the supplied DiscoveryIssueReporter.

Inherited from org.junit.jupiter.engine.descriptor.JupiterTestDescriptor:
cleanUpcopyIncludingDescendantsgetDefaultChildExecutionModegetExclusiveResourcesgetExecutionModegetExecutionModeFromAnnotationgetTagsinvokeExecutionExceptionHandlersprepareshouldBeSkippedtoExecutionModewithUniqueId

Field Detail

loggerback to summary
private static final Logger logger
methodInfoback to summary
private final MethodBasedTestDescriptor.MethodInfo methodInfo

Constructor Detail

MethodBasedTestDescriptorback to summary
pack-priv MethodBasedTestDescriptor(UniqueId uniqueId, Class<?> testClass, Method testMethod, Supplier<List<Class<?>>> enclosingInstanceTypes, JupiterConfiguration configuration)
MethodBasedTestDescriptorback to summary
pack-priv MethodBasedTestDescriptor(UniqueId uniqueId, String displayName, Class<?> testClass, Method testMethod, JupiterConfiguration configuration)

Method Detail

getEnclosingTestClassesback to summary
public List<Class<?>> getEnclosingTestClasses()

Implements org.junit.jupiter.engine.descriptor.TestClassAware.getEnclosingTestClasses.

Annotations
@Override
getExclusiveResourceCollectorback to summary
public ExclusiveResourceCollector getExclusiveResourceCollector()

Implements org.junit.jupiter.engine.descriptor.ResourceLockAware.getExclusiveResourceCollector.

Annotations
@Override
getExplicitExecutionModeback to summary
protected Optional<Node.ExecutionMode> getExplicitExecutionMode()

Overrides org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.getExplicitExecutionMode.

Annotations
@Override
getLegacyReportingNameback to summary
public String getLegacyReportingName()

Overrides default org.junit.platform.engine.TestDescriptor.getLegacyReportingName.

Doc from org.junit.platform.engine.TestDescriptor.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.

The default implementation delegates to getDisplayName().

Annotations
@Override
getResourceLocksProviderEvaluatorback to summary
public Function<ResourceLocksProvider, Set<ResourceLocksProvider.Lock>> getResourceLocksProviderEvaluator()

Implements org.junit.jupiter.engine.descriptor.ResourceLockAware.getResourceLocksProviderEvaluator.

Annotations
@Override
getTagsback to summary
public final Set<TestTag> getTags()

Overrides org.junit.platform.engine.support.descriptor.AbstractTestDescriptor.getTags.

Implements org.junit.platform.engine.TestDescriptor.getTags.

Doc from org.junit.platform.engine.TestDescriptor.getTags.

Get the set of tags associated with this descriptor.

Annotations
@Override
getTestClassback to summary
public final Class<?> getTestClass()

Implements org.junit.jupiter.engine.descriptor.TestClassAware.getTestClass.

Annotations
@Override
getTestMethodback to summary
public final Method getTestMethod()
invokeTestWatchersback to summary
protected void invokeTestWatchers(JupiterEngineExecutionContext context, boolean reverseOrder, Consumer<TestWatcher> callback)
Since
5.4
nodeSkippedback to summary
public void nodeSkipped(JupiterEngineExecutionContext context, TestDescriptor descriptor, Node.SkipResult result)

Overrides default org.junit.platform.engine.support.hierarchical.Node.nodeSkipped.

Invoke TestWatcher#testDisabled(ExtensionContext, Optional) on each registered TestWatcher, in registration order.

Annotations
@Override
Since
5.4
validateback to summary
public void validate(DiscoveryIssueReporter reporter)

Implements org.junit.jupiter.engine.descriptor.Validatable.validate.

Doc from org.junit.jupiter.engine.descriptor.Validatable.validate.

Validate the state of this descriptor and report any issues found to the supplied DiscoveryIssueReporter.

Annotations
@Override
org.junit.jupiter.engine.descriptor back to summary

private Class MethodBasedTestDescriptor.MethodInfo

extends Object
Class Inheritance
  • java.lang.Object
  • org.junit.jupiter.engine.descriptor.MethodBasedTestDescriptor.MethodInfo

Field Summary

Modifier and TypeField and Description
private final List<DiscoveryIssue>
private final Set<TestTag>
tags

Set of method-level tags; does not contain tags from parent.

private final Class<?>
private final Method

Constructor Summary

AccessConstructor and Description
pack-priv
MethodInfo(Class<?> testClass, Method testMethod)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

discoveryIssuesback to summary
private final List<DiscoveryIssue> discoveryIssues
tagsback to summary
private final Set<TestTag> tags

Set of method-level tags; does not contain tags from parent.

testClassback to summary
private final Class<?> testClass
testMethodback to summary
private final Method testMethod

Constructor Detail

MethodInfoback to summary
pack-priv MethodInfo(Class<?> testClass, Method testMethod)