object Canceled extends Serializable
Companion object to class Canceled
that provides, in addition to the extractor and factory method
provided by the compiler given its companion is a case class, a second factory method
that produces a Canceled
outcome given a string message.
- Source
- Outcome.scala
- Alphabetic
- By Inheritance
- Canceled
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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
-
def
apply(message: String)(implicit pos: Position): Canceled
Creates a
Canceled
outcome given a string message.Creates a
Canceled
outcome given a string message.For example, trait
CancelAfterFailure
uses this factory method to create aCanceled
status if acancelRemaining
flag is set, which will be the case if a test failed previously while running the suite:abstract override def withFixture(test: NoArgTest): Outcome = { if (cancelRemaining) Canceled("Canceled by CancelOnFailure because a test failed previously") else super.withFixture(test) match { case failed: Failed => cancelRemaining = true failed case outcome => outcome } }
-
def
apply(ex: Throwable)(implicit pos: Position): Canceled
Creates a
Canceled
instance with the passed inThrowable
.Creates a
Canceled
instance with the passed inThrowable
. If the passed inThrowable
is aTestCanceledException
, it will be set asexception
field, in other case a newTestCanceledException
will be created usingex
as itscause
- ex
the passed in
Throwable
- returns
An instance of
Canceled
withex
set as itsexception
field ifex
is aTestCanceledException
, or a newly createdTestCanceledException
withex
set as itscause
ifex
is not aTestCanceledException
.
-
def
apply(message: String, cause: Throwable)(implicit pos: Position): Canceled
Creates a
Canceled
instance with the passed in message and cause.Creates a
Canceled
instance with the passed in message and cause.- message
the message for the
TestCanceledException
set as itsexception
field- cause
the cause for the
TestCanceledException
set as itsexception
field- returns
An instance of
Canceled
with aTestCanceledException
created from passed inmessage
andcause
set as itsexception
field.
-
def
apply()(implicit pos: Position): Canceled
Creates a
Canceled
instance, with aTestCanceledException
set as itsexception
field.Creates a
Canceled
instance, with aTestCanceledException
set as itsexception
field.- returns
An instance of
Canceled
with aTestCanceledException
set as itsexception
field.
-
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()
-
def
here(cause: Throwable)(implicit pos: Position): Canceled
Creates a
Canceled
with the passed in cause.Creates a
Canceled
with the passed in cause.- cause
the passed in cause
- returns
A
Canceled
withexception
field set to a newly createdTestCanceledException
using the passed incause
.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
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( ... )