Class JupiterTestDescriptor

    • 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.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 inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor

        children
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void cleanUp​(JupiterEngineExecutionContext context)  
      protected static <E extends java.lang.reflect.AnnotatedElement>
      java.lang.String
      determineDisplayName​(E element, java.util.function.Function<E,java.lang.String> defaultDisplayNameGenerator)  
      protected void executeAndMaskThrowable​(org.junit.jupiter.api.function.Executable executable)
      Execute the supplied Executable and mask any exception thrown as an unchecked exception.
      protected java.util.Optional<org.junit.platform.engine.support.hierarchical.Node.ExecutionMode> getDefaultChildExecutionMode()  
      protected java.util.Set<org.junit.platform.engine.support.hierarchical.ExclusiveResource> getExclusiveResourcesFromAnnotation​(java.lang.reflect.AnnotatedElement element)  
      org.junit.platform.engine.support.hierarchical.Node.ExecutionMode getExecutionMode()  
      protected java.util.Optional<org.junit.platform.engine.support.hierarchical.Node.ExecutionMode> getExecutionModeFromAnnotation​(java.lang.reflect.AnnotatedElement element)  
      protected java.util.Optional<org.junit.platform.engine.support.hierarchical.Node.ExecutionMode> getExplicitExecutionMode()  
      protected static java.util.Set<org.junit.platform.engine.TestTag> getTags​(java.lang.reflect.AnnotatedElement element)  
      abstract JupiterEngineExecutionContext prepare​(JupiterEngineExecutionContext context)
      Must be overridden and return a new context so cleanUp() does not accidentally close the parent context.
      org.junit.platform.engine.support.hierarchical.Node.SkipResult shouldBeSkipped​(JupiterEngineExecutionContext context)  
      • Methods inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor

        addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getTags, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, toString
      • Methods inherited from interface org.junit.platform.engine.support.hierarchical.Node

        after, before, execute, getExclusiveResources
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.junit.platform.engine.TestDescriptor

        accept, getDescendants, getLegacyReportingName, getType, isContainer, isRoot, isTest, mayRegisterTests, prune
    • Method Detail

      • getTags

        protected static java.util.Set<org.junit.platform.engine.TestTag> getTags​(java.lang.reflect.AnnotatedElement element)
      • determineDisplayName

        protected static <E extends java.lang.reflect.AnnotatedElement> java.lang.String determineDisplayName​(E element,
                                                                                                              java.util.function.Function<E,java.lang.String> defaultDisplayNameGenerator)
      • getExecutionMode

        public final org.junit.platform.engine.support.hierarchical.Node.ExecutionMode getExecutionMode()
        Specified by:
        getExecutionMode in interface org.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>
      • getExplicitExecutionMode

        protected java.util.Optional<org.junit.platform.engine.support.hierarchical.Node.ExecutionMode> getExplicitExecutionMode()
      • getDefaultChildExecutionMode

        protected java.util.Optional<org.junit.platform.engine.support.hierarchical.Node.ExecutionMode> getDefaultChildExecutionMode()
      • getExecutionModeFromAnnotation

        protected java.util.Optional<org.junit.platform.engine.support.hierarchical.Node.ExecutionMode> getExecutionModeFromAnnotation​(java.lang.reflect.AnnotatedElement element)
      • getExclusiveResourcesFromAnnotation

        protected java.util.Set<org.junit.platform.engine.support.hierarchical.ExclusiveResource> getExclusiveResourcesFromAnnotation​(java.lang.reflect.AnnotatedElement element)
      • shouldBeSkipped

        public org.junit.platform.engine.support.hierarchical.Node.SkipResult shouldBeSkipped​(JupiterEngineExecutionContext context)
                                                                                       throws java.lang.Exception
        Specified by:
        shouldBeSkipped in interface org.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>
        Throws:
        java.lang.Exception
      • executeAndMaskThrowable

        protected void executeAndMaskThrowable​(org.junit.jupiter.api.function.Executable executable)
        Execute the supplied Executable and mask any exception thrown as an unchecked exception.
        Parameters:
        executable - the Executable to execute
        See Also:
        ExceptionUtils.throwAsUncheckedException(Throwable)