ShouldThrownExpectations

This trait provides implicit definitions to transform any value into an Expectable which throws exceptions when a match fails

Companion
object

Type members

Inherited classlikes

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

Value members

Inherited methods

override def anError: Error
Definition Classes
ThrownStandardResults -> StandardResults
Inherited from
ThrownStandardResults
def anError(message: String): Error
Inherited from
StandardResults
override protected def checkResultFailure(result: => Result): Result
Definition Classes
Inherited from
ThrownExpectables
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
override def createExpectable[T](t: => T, alias: Option[String => String]): Expectable[T]
Returns

an Expectable with a description function

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

an Expectable with a function to show the element T

Inherited from
ExpectationsCreation
def done: Success
Inherited from
StandardResults
protected def failure(f: Failure): Failure
Inherited from
ThrownStandardResults
override def failure(m: String): Failure
Definition Classes
ThrownStandardResults -> StandardResults
Inherited from
ThrownStandardResults
override def failure: Failure
Definition Classes
ThrownStandardResults -> StandardResults
Inherited from
ThrownStandardResults
def ko(m: String): Result
Inherited from
ExpectedResults
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
def ok(m: String): Result
Inherited from
ExpectedResults
protected def pending(p: Pending): Pending
Inherited from
ThrownStandardResults
override def pending(m: String): Pending
Definition Classes
ThrownStandardResults -> StandardResults
Inherited from
ThrownStandardResults
override def pending: Pending
Definition Classes
ThrownStandardResults -> StandardResults
Inherited from
ThrownStandardResults
def pending[R](r: => R)(using evidence$1: AsResult[R]): Pending
Inherited from
StandardResults
override def sandboxResult(r: => Result): Result
Returns

the value without any side-effects for expectations

Definition Classes
Inherited from
ThrownStandardMatchResults
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
protected def skipped(s: Skipped): Skipped
Inherited from
ThrownStandardResults
override def skipped(m: String): Skipped
Definition Classes
ThrownStandardResults -> StandardResults
Inherited from
ThrownStandardResults
override def skipped: Skipped
Definition Classes
ThrownStandardResults -> StandardResults
Inherited from
ThrownStandardResults
def skipped[R](r: => R)(using evidence$2: AsResult[R]): Skipped
Inherited from
StandardResults
override def success(m: String): Success
Definition Classes
ThrownStandardResults -> StandardResults
Inherited from
ThrownStandardResults
def theBlock(t: => Nothing): Expectable[Nothing]
Inherited from
ExpectationsCreation
def theValue[T](t: => T): Expectable[T]
Inherited from
ExpectationsCreation
override def todo: Pending
Definition Classes
ThrownStandardResults -> StandardResults
Inherited from
ThrownStandardResults
def wontdo: Success
Inherited from
StandardResults

Inherited fields

lazy override val ko: Result
lazy val ok: Result
Inherited from
ExpectedResults
lazy override val success: Success
Inherited from
ThrownStandardResults

Extensions

Inherited extensions

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

! equality matcher on Expectables

! equality matcher on Expectables

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

equality matcher on Expectables

equality matcher on Expectables

Inherited from
TypedEqual