Class

org.scalatest

CompositeStatus

Related Doc: package scalatest

Permalink

final class CompositeStatus extends Status with Serializable

Composite Status that aggregates its completion and failed states of set of other Statuses passed to its constructor.

Source
Status.scala
Linear Supertypes
Serializable, Status, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CompositeStatus
  2. Serializable
  3. Status
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CompositeStatus(statuses: Set[Status])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. def isCompleted: Boolean

    Permalink

    Non-blocking call to check if the test or suite run is completed, returns true if all composite Statuses have completed, false otherwise.

    Non-blocking call to check if the test or suite run is completed, returns true if all composite Statuses have completed, false otherwise. You can use this to poll the run status.

    returns

    true if all composite Statuses have completed, false otherwise.

    Definition Classes
    CompositeStatusStatus
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. def succeeds(): Boolean

    Permalink

    Blocking call that waits until all composite Statuses have completed, then returns true only if all of the composite Statuses succeeded.

    Blocking call that waits until all composite Statuses have completed, then returns true only if all of the composite Statuses succeeded. If any Status passed in the statuses set fails, this method will return false.

    returns

    true if all composite Statuses succeed, false otherwise.

    Definition Classes
    CompositeStatusStatus
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. final def thenRun(f: ⇒ Status): Status

    Permalink

    Registers a Status-producing by-name function to execute after this Status completes, returning a Status that mirrors the Status returned by the by-name.

    Registers a Status-producing by-name function to execute after this Status completes, returning a Status that mirrors the Status returned by the by-name.

    The Status returned by this method will complete when the status produced by the Status produced by the passed-by name completes. The returned Status will complete with the same succeeds and unreportedException values. But unlike the Status produced by the by-name, the returned Status will be available immediately.

    If the by-name function passed to this method completes abruptly with a non-run-aborting exception, that exception will be caught and installed as the unreportedException on the Status returned by this method. The Status returned by this method will then complete. The thread that attempted to evaluate the by-name function will be allowed to continue (i.e., the non-run-aborting exception will not be rethrown on that thread).

    If the by-name function passed to this method completes abruptly with a run-aborting exception, such as StackOverflowError, that exception will be caught and a new java.util.concurrent.ExecutionException that contains the run-aborting exception as its cause will be installed as the unreportedException on the Status returned by this method. The Status returned by this method will then complete. The original run-aborting exception will then be rethrown on the thread that attempted to evaluate the by-name function.

    If an unreported exception is installed on this Status, the passed by-name function will not be executed. Instead, the same unreported exception will be installed on the Status returned by this method.

    Internally, ScalaTest uses this method in async styles to ensure that by default, each subsequent test in an async-style suite begins execution only after the previous test has completed. This method is not used if ParallelTestExection is mixed into an async style. Instead, tests are allowed to begin execution concurrently.

    returns

    a Status that represents the status of executing the by-name function passed to this method.

    Definition Classes
    Status
  19. final def toFuture: Future[Boolean]

    Permalink

    Converts this Status to a Future[Boolean] where Success(true) means no tests failed and suites aborted, Success(false), means at least one test failed or one suite aborted and any thrown exception was was reported to the Reporter via a ScalaTest event, Failure(unreportedException) means an exception, unreportedException, was thrown that was not reported to the Reporter via a ScalaTest event.

    Converts this Status to a Future[Boolean] where Success(true) means no tests failed and suites aborted, Success(false), means at least one test failed or one suite aborted and any thrown exception was was reported to the Reporter via a ScalaTest event, Failure(unreportedException) means an exception, unreportedException, was thrown that was not reported to the Reporter via a ScalaTest event.

    returns

    a Future[Boolean] representing this Status.

    Definition Classes
    Status
  20. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  21. def unreportedException: Option[Throwable]

    Permalink

    An optional exception that has not been reported to the reporter for this run.

    An optional exception that has not been reported to the reporter for this run.

    This will be defined if any of the composite Statuss (passed to this Status's constructor) has a defined unreportedException. If more than one composite Status has a defined unreportedException, one of them (not specified) will be reported by this method and the others will have their stack traces printed to standard output.

    returns

    a optional unreported Throwable

    Definition Classes
    CompositeStatusStatus
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. def waitUntilCompleted(): Unit

    Permalink

    Blocking call that returns only after all composite Statuss have completed.

    Blocking call that returns only after all composite Statuss have completed.

    Definition Classes
    CompositeStatusStatus
  26. def whenCompleted(f: (Try[Boolean]) ⇒ Unit): Unit

    Permalink

    Registers the passed function to be executed when this status completes.

    Registers the passed function to be executed when this status completes.

    You may register multiple functions, which on completion will be executed in an undefined order.

    Definition Classes
    CompositeStatusStatus
  27. final def withAfterEffect(f: ⇒ Unit): Status

    Permalink

    Registers a by-name function (producing an optional exception) to execute after this Status completes.

    Registers a by-name function (producing an optional exception) to execute after this Status completes.

    If the by-name function passed to this method completes abruptly with a non-run-aborting exception, that exception will be caught and installed as the unreportedException on the Status returned by this method. The Status returned by this method will then complete. The thread that attempted to evaluate the by-name function will be allowed to continue (i.e., the non-run-aborting exception will not be rethrown on that thread).

    If the by-name function passed to this method completes abruptly with a run-aborting exception, such as StackOverflowError, that exception will be caught and a new java.util.concurrent.ExecutionException that contains the run-aborting exception as its cause will be installed as the unreportedException on the Status returned by this method. The Status returned by this method will then complete. The original run-aborting exception will then be rethrown on the thread that attempted to evaluate the by-name function.

    If an unreported exception is installed on this Status, the passed by-name function will not be executed. Instead, the same unreported exception will be installed on the Status returned by this method.

    Internally, ScalaTest uses this method in traits BeforeAndAfter, BeforeAndAfterEach, and BeforeAndAfterEachTestData to ensure "after" code is executed after the relevant test has completed, and in traits BeforeAndAfterAll and BeforeAndAfterAllConfigMap to ensure "after" code is executed after the relevant tests and nested suites have completed.

    f

    A by-name function to invoke after this Status has completed.

    returns

    a Status that represents this Status, modified by any exception thrown by the passed by-name function.

    Definition Classes
    Status

Inherited from Serializable

Inherited from Status

Inherited from AnyRef

Inherited from Any

Ungrouped