Class EngineDiscoveryResult


  • @API(status=EXPERIMENTAL,
         since="1.6")
    public class EngineDiscoveryResult
    extends java.lang.Object
    EngineDiscoveryResult encapsulates the result of test discovery by a TestEngine.

    A EngineDiscoveryResult consists of a mandatory Status and an optional Throwable.

    Since:
    1.6
    • Method Detail

      • successful

        public static EngineDiscoveryResult successful()
        Create a EngineDiscoveryResult for a successful test discovery.
        Returns:
        the EngineDiscoveryResult; never null
      • failed

        public static EngineDiscoveryResult failed​(java.lang.Throwable throwable)
        Create a EngineDiscoveryResult for a failed test discovery.
        Parameters:
        throwable - the throwable that caused the failed discovery; may be null
        Returns:
        the EngineDiscoveryResult; never null
      • getThrowable

        public java.util.Optional<java.lang.Throwable> getThrowable()
        Get the throwable that caused this result, if available.
        Returns:
        an Optional containing the throwable; never null but potentially empty
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object