ExpectationsCreation

Base trait to create expectations.

An expectation is a value which can have an optional description and which can be matched to produce a result (for example against an expected value)

When a result is produced it can possibly be thrown as an exception based on the behaviour of the ResultChecks trait

class Object
trait Matchable
class Any

Value members

Concrete methods

def createExpectable[T](t: => T, alias: Option[String => String]): Expectable[T]
Returns:

an Expectable with a description function

def createExpectable[T](t: => T): Expectable[T]
Returns:

an Expectable

def createExpectable[T](t: => T, alias: => String): Expectable[T]
Returns:

an Expectable with a description

def createExpectable[T](t: => T, alias: String => String): Expectable[T]
Returns:

an Expectable with a description function

def createExpectableWithShowAs[T](t: => T, showAs: => String): Expectable[T]
Returns:

an Expectable with a function to show the element T

def theBlock(t: => Nothing): Expectable[Nothing]
def theValue[T](t: => T): Expectable[T]

Inherited methods

protected def checkResultFailure(r: => Result): Result

this method can be overridden to throw exceptions when checking a result

this method can be overridden to throw exceptions when checking a result

Inherited from:
ResultChecks
protected def mapResult(r: Result): Result

this method can be overridden to intercept a Result and modify it. It is used for example to set a stacktrace providing the location of a failure

this method can be overridden to intercept a Result and modify it. It is used for example to set a stacktrace providing the location of a failure

Inherited from:
ResultChecks
protected def sandboxResult(r: => Result): Result
Returns:

the result without any side-effects

Inherited from:
ResultChecks
protected def setStacktrace(m: Result): Result

this method can be overridden to avoid filling-in a stacktrace indicating the location of the result

this method can be overridden to avoid filling-in a stacktrace indicating the location of the result

Inherited from:
MatchResultStackTrace