ShouldExpectations

This trait provides implicit definitions to check values with matchers by using a "should" syntax: value should matcher

Companion:
object
class Object
trait Matchable
class Any

Type members

Classlikes

implicit implicit class expectShould[T](tm: => T)(using not: NotGiven[NoShouldExpectations])
implicit implicit class expectedShould[T](tm: Expectable[T])(using not: NotGiven[NoShouldExpectations])

Value members

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
def createExpectable[T](t: => T, alias: String => String): Expectable[T]
Returns:

an Expectable with a description function

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

an Expectable with a description

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

an Expectable

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

an Expectable with a description function

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

an Expectable with a function to show the element T

Inherited from:
ExpectationsCreation
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
def theBlock(t: => Nothing): Expectable[Nothing]
Inherited from:
ExpectationsCreation
def theValue[T](t: => T): Expectable[T]
Inherited from:
ExpectationsCreation

Extensions

Inherited extensions

extension [T](t: => T)
def !==(using not: NotGiven[NoTypedEqual])(other: => T)(using evidence$2: Diffable[T]): Result

! equality matcher on Expectables

! equality matcher on Expectables

Inherited from:
TypedEqual
def ===(using not: NotGiven[NoTypedEqual])(other: => T)(using evidence$1: Diffable[T]): Result

equality matcher on Expectables

equality matcher on Expectables

Inherited from:
TypedEqual

Implicits

Implicits

final implicit def expectShould[T](tm: => T)(using not: NotGiven[NoShouldExpectations]): expectShould[T]
final implicit def expectedShould[T](tm: Expectable[T])(using not: NotGiven[NoShouldExpectations]): expectedShould[T]