Class VintageTestDescriptor

java.lang.Object
org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
org.junit.vintage.engine.descriptor.VintageTestDescriptor
All Implemented Interfaces:
TestDescriptor
Direct Known Subclasses:
RunnerTestDescriptor

@API(status=INTERNAL, since="4.12") public class VintageTestDescriptor extends AbstractTestDescriptor
Since:
4.12
  • Field Details

  • Constructor Details

    • VintageTestDescriptor

      public VintageTestDescriptor(UniqueId uniqueId, org.junit.runner.Description description, TestSource source)
    • VintageTestDescriptor

      VintageTestDescriptor(UniqueId uniqueId, org.junit.runner.Description description, String displayName, TestSource source)
  • Method Details

    • generateDisplayName

      private static String generateDisplayName(org.junit.runner.Description description)
    • getDescription

      public org.junit.runner.Description getDescription()
    • getLegacyReportingName

      public String getLegacyReportingName()
      Description copied from interface: TestDescriptor
      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 TestDescriptor.getDisplayName().

      Returns:
      the legacy reporting name; never null or blank
    • getType

      public TestDescriptor.Type getType()
      Description copied from interface: TestDescriptor
      Determine the TestDescriptor.Type of this descriptor.
      Returns:
      the descriptor type; never null.
      See Also:
    • getTags

      public Set<TestTag> getTags()
      Description copied from interface: TestDescriptor
      Get the set of tags associated with this descriptor.
      Specified by:
      getTags in interface TestDescriptor
      Overrides:
      getTags in class AbstractTestDescriptor
      Returns:
      the set of tags associated with this descriptor; never null but potentially empty
      See Also:
    • removeFromHierarchy

      public void removeFromHierarchy()
      Description copied from interface: TestDescriptor
      Remove this non-root descriptor from its parent and remove all the children from this descriptor.

      If this method is invoked on a root descriptor, this method must throw a JUnitException explaining that a root cannot be removed from the hierarchy.

      Specified by:
      removeFromHierarchy in interface TestDescriptor
      Overrides:
      removeFromHierarchy in class AbstractTestDescriptor
    • canBeRemovedFromHierarchy

      protected boolean canBeRemovedFromHierarchy()
    • tryToExcludeFromRunner

      protected boolean tryToExcludeFromRunner(org.junit.runner.Description description)
    • pruneDescriptorsForObsoleteDescriptions

      void pruneDescriptorsForObsoleteDescriptions(List<org.junit.runner.Description> newSiblingDescriptions)
    • addTagsFromParent

      private void addTagsFromParent(Set<TestTag> tags)
    • addCategoriesAsTags

      private void addCategoriesAsTags(Set<TestTag> tags)