Class NestedClassTestDescriptor

java.lang.Object
org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
All Implemented Interfaces:
TestClassAware, Validatable, 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, Supplier<List<Class<?>>> enclosingInstanceTypes, JupiterConfiguration configuration)
  • Method Details

    • withUniqueId

      protected NestedClassTestDescriptor withUniqueId(UnaryOperator<org.junit.platform.engine.UniqueId> uniqueIdTransformer)
      Description copied from class: JupiterTestDescriptor
      Returns shallow copy (without children) of this descriptor with the supplied unique ID.
      Specified by:
      withUniqueId in class JupiterTestDescriptor
      Returns:
      shallow copy (without children) of this descriptor with the supplied unique ID
    • 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()
    • getEnclosingTestClasses

      @API(status=INTERNAL, since="5.12") public static List<Class<?>> getEnclosingTestClasses(org.junit.platform.engine.TestDescriptor parent)
    • instantiateTestClass

      protected org.junit.jupiter.api.extension.TestInstances instantiateTestClass(JupiterEngineExecutionContext parentExecutionContext, ExtensionContextSupplier extensionContext, ExtensionRegistry registry, JupiterEngineExecutionContext context)
      Specified by:
      instantiateTestClass in class ClassBasedTestDescriptor
    • getResourceLocksProviderEvaluator

      public Function<org.junit.jupiter.api.parallel.ResourceLocksProvider,Set<org.junit.jupiter.api.parallel.ResourceLocksProvider.Lock>> getResourceLocksProviderEvaluator()
    • determineExclusiveResources

      default Stream<org.junit.platform.engine.support.hierarchical.ExclusiveResource> determineExclusiveResources()
    • determineOwnExclusiveResources

      default Stream<org.junit.platform.engine.support.hierarchical.ExclusiveResource> determineOwnExclusiveResources(Function<org.junit.jupiter.api.parallel.ResourceLocksProvider,Set<org.junit.jupiter.api.parallel.ResourceLocksProvider.Lock>> providerToLocks)