sealed abstract class Exceptional extends Outcome
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 }
- Source
- Outcome.scala
- Alphabetic
- By Inheritance
- Exceptional
- Outcome
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
canEqual(that: Any): Boolean
- Definition Classes
- Equals
-
abstract
def
productArity: Int
- Definition Classes
- Product
-
abstract
def
productElement(n: Int): Any
- Definition Classes
- Product
-
abstract
def
toSucceeded: Succeeded.type
Converts this
Outcome
to aSucceeded
.Converts this
Outcome
to aSucceeded
.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.
- Definition Classes
- Outcome
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
val
isCanceled: Boolean
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
.
- Definition Classes
- Outcome
-
val
isExceptional: Boolean
Indicates that this
Outcome
represents a test that either failed or was canceled.Indicates that this
Outcome
represents a test that either failed or was canceled.- returns
true
- Definition Classes
- Exceptional → Outcome
-
val
isFailed: Boolean
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
.
- Definition Classes
- Outcome
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
isPending: Boolean
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
.
- Definition Classes
- Outcome
-
val
isSucceeded: Boolean
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
.
- Definition Classes
- Outcome
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
productIterator: Iterator[Any]
- Definition Classes
- Product
-
def
productPrefix: String
- Definition Classes
- Product
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toOption: Option[Throwable]
Converts this
Exceptional
to aSome
that wraps the contained exception.Converts this
Exceptional
to aSome
that wraps the contained exception.- returns
A
Some
wrapping the exception contained in thisExceptional
.
- Definition Classes
- Exceptional → Outcome
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )