trait
ThrownExpectations
extends Expectations
Value Members
-
def
!=
(arg0: AnyRef): Boolean
-
def
!=
(arg0: Any): Boolean
-
def
##
(): Int
-
def
==
(arg0: AnyRef): Boolean
-
def
==
(arg0: Any): Boolean
-
def
asInstanceOf
[T0]
: T0
-
implicit def
canBeEqual
[T]
(t: ⇒ T): CanBeEqual[T]
-
-
def
clone
(): AnyRef
-
def
createExpectable
[T]
(t: ⇒ T, alias: Option[(String) ⇒ String]): Expectable[T]
-
def
createExpectable
[T]
(t: ⇒ T, alias: (String) ⇒ String): Expectable[T]
-
def
createExpectable
[T]
(t: ⇒ T, alias: String): Expectable[T]
-
def
createExpectable
[T]
(t: ⇒ T): Expectable[T]
-
implicit def
describe
[T]
(t: ⇒ T): Descriptible[T]
-
def
eq
(arg0: AnyRef): Boolean
-
def
equals
(arg0: Any): Boolean
-
def
failure
(f: Failure): Nothing
-
def
failure
(m: String): Nothing
-
def
finalize
(): Unit
-
def
getClass
(): java.lang.Class[_]
-
def
hashCode
(): Int
-
def
isInstanceOf
[T0]
: Boolean
-
def
ne
(arg0: AnyRef): Boolean
-
def
notify
(): Unit
-
def
notifyAll
(): Unit
-
def
skipped
(s: Skipped): Nothing
-
def
skipped
(m: String): Nothing
-
def
synchronized
[T0]
(arg0: ⇒ T0): T0
-
def
toString
(): String
-
def
wait
(): Unit
-
def
wait
(arg0: Long, arg1: Int): Unit
-
def
wait
(arg0: Long): Unit
Inherited from AnyRef
Inherited from Any
Thrown expectations will throw a FailureException if a match fails
This trait can be extended to be used in another framework like ScalaTest:
trait ScalaTestExpectations extends ThrownExpectations { override protected def checkFailure[T](m: =>MatchResult[T]) = { m match { case f @ MatchFailure(ok, ko, _, _) => throw new TestFailedException(f.message, f.exception, 0) case _ => () } m } }