Class NestedClassTestDescriptor

java.lang.Object
org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
All Implemented Interfaces:
org.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>, org.junit.platform.engine.TestDescriptor

@API(status=INTERNAL, since="5.0") public class NestedClassTestDescriptor extends ClassBasedTestDescriptor
TestDescriptor for tests based on nested (but not static) Java classes.

Default Display Names

The default display name for a non-static nested test class is the simple name of the class.

Since:
5.0
  • Field Details

  • Constructor Details

    • NestedClassTestDescriptor

      public NestedClassTestDescriptor(org.junit.platform.engine.UniqueId uniqueId, Class<?> testClass, JupiterConfiguration configuration)
  • Method Details

    • getTags

      public final Set<org.junit.platform.engine.TestTag> getTags()
      Specified by:
      getTags in interface org.junit.platform.engine.TestDescriptor
      Overrides:
      getTags in class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
    • getEnclosingTestClasses

      public List<Class<?>> getEnclosingTestClasses()
      Specified by:
      getEnclosingTestClasses in class ClassBasedTestDescriptor
    • instantiateTestClass

      protected org.junit.jupiter.api.extension.TestInstances instantiateTestClass(JupiterEngineExecutionContext parentExecutionContext, ExtensionRegistry registry, ExtensionRegistrar registrar, org.junit.jupiter.api.extension.ExtensionContext extensionContext, org.junit.platform.engine.support.hierarchical.ThrowableCollector throwableCollector)
      Specified by:
      instantiateTestClass in class ClassBasedTestDescriptor