abstract class MethodBasedTestDescriptor extends JupiterTestDescriptor
TestDescriptors
based on Java methods.Node.DynamicTestExecutor, Node.SkipResult
TestDescriptor.Type, TestDescriptor.Visitor
Modifier and Type | Field and Description |
---|---|
private java.lang.Class<?> |
testClass |
private java.lang.reflect.Method |
testMethod |
children
Constructor and Description |
---|
MethodBasedTestDescriptor(UniqueId uniqueId,
java.lang.Class<?> testClass,
java.lang.reflect.Method testMethod) |
MethodBasedTestDescriptor(UniqueId uniqueId,
java.lang.String displayName,
java.lang.Class<?> testClass,
java.lang.reflect.Method testMethod) |
Modifier and Type | Method and Description |
---|---|
private static java.lang.String |
generateDefaultDisplayName(java.lang.reflect.Method testMethod) |
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() |
determineDisplayName, executeAndMaskThrowable, getTags, populateNewExtensionRegistryFromExtendWith, shouldBeSkipped
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
after, before, execute, prepare
accept, containsTests, getDescendants, getType, isContainer, isRoot, isTest, mayRegisterTests, prune
private final java.lang.Class<?> testClass
private final java.lang.reflect.Method testMethod
MethodBasedTestDescriptor(UniqueId uniqueId, java.lang.Class<?> testClass, java.lang.reflect.Method testMethod)
MethodBasedTestDescriptor(UniqueId uniqueId, java.lang.String displayName, java.lang.Class<?> testClass, java.lang.reflect.Method testMethod)
public final java.util.Set<TestTag> getTags()
TestDescriptor
getTags
in interface TestDescriptor
getTags
in class AbstractTestDescriptor
null
but potentially emptyTestTag
public final java.lang.Class<?> getTestClass()
public final java.lang.reflect.Method getTestMethod()
public java.lang.String getLegacyReportingName()
TestDescriptor
The default implementation simply delegates to TestDescriptor.getDisplayName()
.
null
or blankprivate static java.lang.String generateDefaultDisplayName(java.lang.reflect.Method testMethod)