@API(status=INTERNAL,
since="4.12")
public class VintageTestDescriptor
extends AbstractTestDescriptor
TestDescriptor.Type, TestDescriptor.Visitor| Modifier and Type | Field and Description |
|---|---|
protected org.junit.runner.Description |
description |
static java.lang.String |
ENGINE_ID |
static java.lang.String |
SEGMENT_TYPE_DYNAMIC |
static java.lang.String |
SEGMENT_TYPE_RUNNER |
static java.lang.String |
SEGMENT_TYPE_TEST |
children| Constructor and Description |
|---|
VintageTestDescriptor(UniqueId uniqueId,
org.junit.runner.Description description) |
VintageTestDescriptor(UniqueId uniqueId,
org.junit.runner.Description description,
java.lang.String displayName,
TestSource source) |
| Modifier and Type | Method and Description |
|---|---|
private void |
addCategoriesAsTags(java.util.Set<TestTag> tags) |
private void |
addTagsFromParent(java.util.Set<TestTag> tags) |
protected boolean |
canBeRemovedFromHierarchy() |
private static java.lang.reflect.Method |
findMethod(java.lang.Class<?> testClass,
java.lang.String methodName) |
private static java.lang.String |
generateDisplayName(org.junit.runner.Description description) |
org.junit.runner.Description |
getDescription() |
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.
|
TestDescriptor.Type |
getType()
Determine the
TestDescriptor.Type of this descriptor. |
(package private) void |
pruneDescriptorsForObsoleteDescriptions(java.util.List<org.junit.runner.Description> newSiblingDescriptions) |
void |
removeFromHierarchy()
Remove this non-root descriptor from its parent and remove all the
children from this descriptor.
|
private static TestSource |
toTestSource(org.junit.runner.Description description) |
protected boolean |
tryToExcludeFromRunner(org.junit.runner.Description description) |
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, setParent, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaccept, containsTests, getDescendants, isContainer, isRoot, isTest, mayRegisterTests, prunepublic static final java.lang.String ENGINE_ID
public static final java.lang.String SEGMENT_TYPE_RUNNER
public static final java.lang.String SEGMENT_TYPE_TEST
public static final java.lang.String SEGMENT_TYPE_DYNAMIC
protected org.junit.runner.Description description
public VintageTestDescriptor(UniqueId uniqueId, org.junit.runner.Description description)
VintageTestDescriptor(UniqueId uniqueId, org.junit.runner.Description description, java.lang.String displayName, TestSource source)
private static java.lang.String generateDisplayName(org.junit.runner.Description description)
public org.junit.runner.Description getDescription()
public java.lang.String getLegacyReportingName()
TestDescriptorThe default implementation simply delegates to TestDescriptor.getDisplayName().
null or blankpublic TestDescriptor.Type getType()
TestDescriptorTestDescriptor.Type of this descriptor.null.TestDescriptor.isContainer(),
TestDescriptor.isTest()public java.util.Set<TestTag> getTags()
TestDescriptorgetTags in interface TestDescriptorgetTags in class AbstractTestDescriptornull
but potentially emptyTestTagpublic void removeFromHierarchy()
TestDescriptorIf this method is invoked on a root descriptor,
this method must throw a JUnitException explaining that a root cannot be removed from the
hierarchy.
removeFromHierarchy in interface TestDescriptorremoveFromHierarchy in class AbstractTestDescriptorprotected boolean canBeRemovedFromHierarchy()
protected boolean tryToExcludeFromRunner(org.junit.runner.Description description)
void pruneDescriptorsForObsoleteDescriptions(java.util.List<org.junit.runner.Description> newSiblingDescriptions)
private void addTagsFromParent(java.util.Set<TestTag> tags)
private void addCategoriesAsTags(java.util.Set<TestTag> tags)
private static TestSource toTestSource(org.junit.runner.Description description)
private static java.lang.reflect.Method findMethod(java.lang.Class<?> testClass,
java.lang.String methodName)