Class MethodBasedTestDescriptor

    • Field Detail

      • logger

        private static final org.junit.platform.commons.logging.Logger logger
      • testClass

        private final java.lang.Class<?> testClass
      • testMethod

        private final java.lang.reflect.Method testMethod
      • tags

        private final java.util.Set<TestTag> tags
        Set of method-level tags; does not contain tags from parent.
    • Constructor Detail

      • MethodBasedTestDescriptor

        MethodBasedTestDescriptor​(UniqueId uniqueId,
                                  java.lang.Class<?> testClass,
                                  java.lang.reflect.Method testMethod,
                                  JupiterConfiguration configuration)
      • MethodBasedTestDescriptor

        MethodBasedTestDescriptor​(UniqueId uniqueId,
                                  java.lang.String displayName,
                                  java.lang.Class<?> testClass,
                                  java.lang.reflect.Method testMethod,
                                  JupiterConfiguration configuration)
    • Method Detail

      • getExclusiveResources

        public java.util.Set<ExclusiveResource> getExclusiveResources()
        Description copied from interface: Node
        Get the set of exclusive resources required to execute this node.

        The default implementation returns an empty set.

        Returns:
        the set of exclusive resources required by this node; never null but potentially empty
        See Also:
        ExclusiveResource
      • getTestClass

        public final java.lang.Class<?> getTestClass()
      • getTestMethod

        public final java.lang.reflect.Method getTestMethod()
      • getLegacyReportingName

        public java.lang.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
      • nodeSkipped

        public void nodeSkipped​(JupiterEngineExecutionContext context,
                                TestDescriptor descriptor,
                                Node.SkipResult result)
        Invoke TestWatcher.testDisabled(ExtensionContext, Optional) on each registered TestWatcher, in registration order.
        Parameters:
        context - the execution context
        descriptor - the test descriptor that was skipped
        result - the result of skipped execution
        Since:
        5.4
      • invokeTestWatchers

        protected void invokeTestWatchers​(JupiterEngineExecutionContext context,
                                          boolean reverseOrder,
                                          java.util.function.Consumer<org.junit.jupiter.api.extension.TestWatcher> callback)
        Since:
        5.4