Failed

org.scalatest.Failed
See theFailed companion object
case class Failed(exception: Throwable) extends Exceptional

Outcome for a test that failed, containing an exception describing the cause of the failure.

Note: the difference between this Failed class and the similarly named FailedStatus object is that an instance of this class indicates one test failed, whereas the FailedStatus object indicates either one or more tests failed and/or one or more suites aborted during a run. Both are used as the result type of Suite lifecycle methods, but Failed is a possible result of withFixture, whereas FailedStatus is a possible result of run, runNestedSuites, runTests, or runTest. In short, Failed is always just about one test, whereas FailedStatus could be about something larger: multiple tests or an entire suite.

Value parameters

ex

the Throwable contained in this Failed.

Attributes

Companion
object
Graph
Supertypes
class Exceptional
class Outcome
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Converts this Outcome to a Succeeded.

Converts this Outcome to a Succeeded.

The implmentation of this class will re-throw the passed in exception.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
override def toOption: Option[Throwable]

Converts this Exceptional to a Some that wraps the contained exception.

Converts this Exceptional to a Some that wraps the contained exception.

Attributes

Returns

A Some wrapping the exception contained in this Exceptional.

Definition Classes
Inherited from:
Exceptional

Concrete fields

override val isFailed: Boolean

Indicates that this Outcome represents a test that failed.

Indicates that this Outcome represents a test that failed.

This class's implementation of this method always returns true.

Attributes

Returns

true

Inherited fields

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.

Attributes

Returns

true if this Outcome is an instance of Canceled.

Inherited from:
Outcome
override 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.

Attributes

Returns

true

Inherited from:
Exceptional
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.

Attributes

Returns

true if this Outcome is an instance of Pending.

Inherited from:
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.

Attributes

Returns

true if this Outcome is an instance of Succeeded.

Inherited from:
Outcome