Superclass for the two outcomes of running a test that contain an exception: Failed
and Canceled
.
This class provides a toOption
method that returns a Some
wrapping the contained exception, and
an isExceptional
field with the value true
. It's companion object provides an extractor that
enables patterns that match a test that either failed or canceled, as in:
outcome match { case Exceptional(ex) => // handle failed or canceled case case _ => // handle succeeded, pending, or omitted case }
- Value parameters:
- ex
the
Throwable
contained in thisExceptional
.
- Companion:
- object
Value members
Concrete methods
Inherited methods
Converts this Outcome
to a Succeeded
.
Converts this Outcome
to a Succeeded
.
When this Outcome
instance is not Succeeded, it behaves as followed:
-
Failed(ex) - throws ex
-
Canceled(tce) - throws tce
-
Pending - throws TestPendingException
- Returns:
Succeeded if this
Outcome
instance is a Succeeded.- Inherited from:
- Outcome
Concrete fields
Inherited fields
Indicates whether this Outcome
represents a test that was canceled.
Indicates whether this Outcome
represents a test that was canceled.
This class's implementation of this method always returns false
.
- Returns:
true if this
Outcome
is an instance ofCanceled
.- Inherited from:
- Outcome
Indicates whether this Outcome
represents a test that failed.
Indicates whether this Outcome
represents a test that failed.
This class's implementation of this method always returns false
.
- Returns:
true if this
Outcome
is an instance ofFailed
.- Inherited from:
- Outcome
Indicates whether this Outcome
represents a test that was pending.
Indicates whether this Outcome
represents a test that was pending.
This class's implementation of this method always returns false
.
- Returns:
true if this
Outcome
is an instance ofPending
.- Inherited from:
- Outcome
Indicates whether this Outcome
represents a test that succeeded.
Indicates whether this Outcome
represents a test that succeeded.
This class's implementation of this method always returns false
.
- Returns:
true if this
Outcome
is an instance ofSucceeded
.- Inherited from:
- Outcome