Class JupiterTestDescriptor

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) static interface  JupiterTestDescriptor.ExceptionHandlerInvoker<E extends org.junit.jupiter.api.extension.Extension>  
      • 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
    • Constructor Summary

      Constructors 
      Constructor Description
      JupiterTestDescriptor​(org.junit.platform.engine.UniqueId uniqueId, java.lang.reflect.AnnotatedElement element, java.util.function.Supplier<java.lang.String> displayNameSupplier, org.junit.platform.engine.TestSource source, JupiterConfiguration configuration)  
      JupiterTestDescriptor​(org.junit.platform.engine.UniqueId uniqueId, java.lang.String displayName, org.junit.platform.engine.TestSource source, JupiterConfiguration configuration)  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      private java.util.stream.IntStream asStream​(java.util.OptionalInt optInt)  
      void cleanUp​(JupiterEngineExecutionContext context)  
      protected JupiterTestDescriptor copyIncludingDescendants​(java.util.function.UnaryOperator<org.junit.platform.engine.UniqueId> uniqueIdTransformer)
      {@return a deep copy (with copies of children) of this descriptor with the supplied unique ID}
      (package private) java.util.Optional<org.junit.platform.engine.support.hierarchical.Node.ExecutionMode> getDefaultChildExecutionMode()  
      java.util.Set<org.junit.platform.engine.support.hierarchical.ExclusiveResource> getExclusiveResources()  
      org.junit.platform.engine.support.hierarchical.Node.ExecutionMode getExecutionMode()  
      (package private) java.util.Optional<org.junit.platform.engine.support.hierarchical.Node.ExecutionMode> getExecutionModeFromAnnotation​(java.lang.reflect.AnnotatedElement element)  
      (package private) java.util.Optional<org.junit.platform.engine.support.hierarchical.Node.ExecutionMode> getExplicitExecutionMode()  
      protected java.lang.String getLegacyReportingBaseName()  
      protected java.util.OptionalInt getLegacyReportingIndex()  
      private java.util.stream.IntStream getLegacyReportingIndexes()  
      java.lang.String getLegacyReportingName()  
      (package private) static java.util.Set<org.junit.platform.engine.TestTag> getTags​(java.lang.reflect.AnnotatedElement element, java.util.function.Supplier<java.lang.String> elementDescription, java.util.function.Supplier<org.junit.platform.engine.TestSource> sourceProvider, java.util.function.Consumer<org.junit.platform.engine.DiscoveryIssue> issueCollector)  
      (package private) <E extends org.junit.jupiter.api.extension.Extension>
      void
      invokeExecutionExceptionHandlers​(java.lang.Class<E> handlerType, ExtensionRegistry registry, java.lang.Throwable throwable, JupiterTestDescriptor.ExceptionHandlerInvoker<E> handlerInvoker)
      Invoke exception handlers for the supplied Throwable one-by-one until none are left or the throwable to handle has been swallowed.
      private <E extends org.junit.jupiter.api.extension.Extension>
      void
      invokeExecutionExceptionHandlers​(java.util.List<E> exceptionHandlers, java.lang.Throwable throwable, JupiterTestDescriptor.ExceptionHandlerInvoker<E> handlerInvoker)  
      abstract JupiterEngineExecutionContext prepare​(JupiterEngineExecutionContext context)
      Must be overridden and return a new context with a new ExtensionContext so cleanUp() does not accidentally close the parent context.
      org.junit.platform.engine.support.hierarchical.Node.SkipResult shouldBeSkipped​(JupiterEngineExecutionContext context)  
      static org.junit.platform.engine.support.hierarchical.Node.ExecutionMode toExecutionMode​(org.junit.jupiter.api.parallel.ExecutionMode mode)  
      private org.junit.platform.engine.support.hierarchical.Node.SkipResult toSkipResult​(org.junit.jupiter.api.extension.ConditionEvaluationResult evaluationResult)  
      protected abstract JupiterTestDescriptor withUniqueId​(java.util.function.UnaryOperator<org.junit.platform.engine.UniqueId> uniqueIdTransformer)
      {@return shallow copy (without children) of this descriptor with the supplied unique ID}
      • Methods inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor

        addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getTags, getUniqueId, hashCode, orderChildren, removeChild, removeFromHierarchy, setParent, toString
      • Methods inherited from class java.lang.Object

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

        after, around, before, execute, nodeFinished, nodeSkipped
      • Methods inherited from interface org.junit.platform.engine.TestDescriptor

        accept, getAncestors, getDescendants, getType, isContainer, isRoot, isTest, mayRegisterTests, prune
    • Constructor Detail

      • JupiterTestDescriptor

        JupiterTestDescriptor​(org.junit.platform.engine.UniqueId uniqueId,
                              java.lang.reflect.AnnotatedElement element,
                              java.util.function.Supplier<java.lang.String> displayNameSupplier,
                              org.junit.platform.engine.TestSource source,
                              JupiterConfiguration configuration)
      • JupiterTestDescriptor

        JupiterTestDescriptor​(org.junit.platform.engine.UniqueId uniqueId,
                              java.lang.String displayName,
                              org.junit.platform.engine.TestSource source,
                              JupiterConfiguration configuration)
    • Method Detail

      • getLegacyReportingName

        public final java.lang.String getLegacyReportingName()
        Specified by:
        getLegacyReportingName in interface org.junit.platform.engine.TestDescriptor
      • getLegacyReportingBaseName

        protected java.lang.String getLegacyReportingBaseName()
      • getLegacyReportingIndexes

        private java.util.stream.IntStream getLegacyReportingIndexes()
      • asStream

        private java.util.stream.IntStream asStream​(java.util.OptionalInt optInt)
      • getLegacyReportingIndex

        protected java.util.OptionalInt getLegacyReportingIndex()
      • getTags

        static java.util.Set<org.junit.platform.engine.TestTag> getTags​(java.lang.reflect.AnnotatedElement element,
                                                                        java.util.function.Supplier<java.lang.String> elementDescription,
                                                                        java.util.function.Supplier<org.junit.platform.engine.TestSource> sourceProvider,
                                                                        java.util.function.Consumer<org.junit.platform.engine.DiscoveryIssue> issueCollector)
      • invokeExecutionExceptionHandlers

        <E extends org.junit.jupiter.api.extension.Extension> void invokeExecutionExceptionHandlers​(java.lang.Class<E> handlerType,
                                                                                                    ExtensionRegistry registry,
                                                                                                    java.lang.Throwable throwable,
                                                                                                    JupiterTestDescriptor.ExceptionHandlerInvoker<E> handlerInvoker)
        Invoke exception handlers for the supplied Throwable one-by-one until none are left or the throwable to handle has been swallowed.
      • invokeExecutionExceptionHandlers

        private <E extends org.junit.jupiter.api.extension.Extension> void invokeExecutionExceptionHandlers​(java.util.List<E> exceptionHandlers,
                                                                                                            java.lang.Throwable throwable,
                                                                                                            JupiterTestDescriptor.ExceptionHandlerInvoker<E> handlerInvoker)
      • getExecutionMode

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

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

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

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

        public static org.junit.platform.engine.support.hierarchical.Node.ExecutionMode toExecutionMode​(org.junit.jupiter.api.parallel.ExecutionMode mode)
      • getExclusiveResources

        public java.util.Set<org.junit.platform.engine.support.hierarchical.ExclusiveResource> getExclusiveResources()
        Specified by:
        getExclusiveResources in interface org.junit.platform.engine.support.hierarchical.Node<JupiterEngineExecutionContext>
      • toSkipResult

        private org.junit.platform.engine.support.hierarchical.Node.SkipResult toSkipResult​(org.junit.jupiter.api.extension.ConditionEvaluationResult evaluationResult)
      • copyIncludingDescendants

        protected JupiterTestDescriptor copyIncludingDescendants​(java.util.function.UnaryOperator<org.junit.platform.engine.UniqueId> uniqueIdTransformer)
        {@return a deep copy (with copies of children) of this descriptor with the supplied unique ID}
      • withUniqueId

        protected abstract JupiterTestDescriptor withUniqueId​(java.util.function.UnaryOperator<org.junit.platform.engine.UniqueId> uniqueIdTransformer)
        {@return shallow copy (without children) of this descriptor with the supplied unique ID}