Class TestMethodTestDescriptor

  • All Implemented Interfaces:
    org.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>, org.junit.platform.engine.TestDescriptor
    Direct Known Subclasses:
    TestFactoryTestDescriptor, TestTemplateInvocationTestDescriptor

    @API(status=INTERNAL,
         since="5.0")
    public class TestMethodTestDescriptor
    extends MethodBasedTestDescriptor
    TestDescriptor for @Test methods.

    Default Display Names

    The default display name for a test method is the name of the method concatenated with a comma-separated list of parameter types in parentheses. The names of parameter types are retrieved using Class.getSimpleName(). For example, the default display name for the following test method is testUser(TestInfo, User).

       @Test
       void testUser(TestInfo testInfo, @Mock User user) { ... }
     
    Since:
    5.0
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.junit.platform.engine.support.hierarchical.Node

        org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor, org.junit.platform.engine.support.hierarchical.Node.ExecutionMode, org.junit.platform.engine.support.hierarchical.Node.Invocation<C extends org.junit.platform.engine.support.hierarchical.EngineExecutionContext>, org.junit.platform.engine.support.hierarchical.Node.SkipResult
      • Nested classes/interfaces inherited from interface org.junit.platform.engine.TestDescriptor

        org.junit.platform.engine.TestDescriptor.Type, org.junit.platform.engine.TestDescriptor.Visitor
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String SEGMENT_TYPE  
      • Fields inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor

        children
    • Constructor Summary

      Constructors 
      Constructor Description
      TestMethodTestDescriptor​(org.junit.platform.engine.UniqueId uniqueId, java.lang.Class<?> testClass, java.lang.reflect.Method testMethod, JupiterConfiguration configuration)