MatcherImplicits

org.specs2.matcher.MatcherImplicits$
See theMatcherImplicits companion trait

Attributes

Companion
trait
Graph
Supertypes
trait ResultChecks
class Object
trait Matchable
class Any
Show all
Self type

Members list

Value members

Inherited methods

def atLeastOnceWhen[T, R](values: Iterable[T])(f: PartialFunction[T, R])(using evidence$15: AsResult[R]): Result

verify the function f for at least one value, where the PartialFunction is defined

verify the function f for at least one value, where the PartialFunction is defined

Attributes

Inherited from:
MatcherImplicits
def atMostOnceWhen[T, R](values: Iterable[T])(f: PartialFunction[T, R])(using evidence$16: AsResult[R]): Result

verify the function f for at least one value, where the PartialFunction is defined

verify the function f for at least one value, where the PartialFunction is defined

Attributes

Inherited from:
MatcherImplicits
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

Attributes

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

Attributes

Returns

an Expectable with a description function

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

Attributes

Returns

an Expectable with a description

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

Attributes

Returns

an Expectable

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

Attributes

Returns

an Expectable with a description function

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

Attributes

Returns

an Expectable with a function to show the element T

Inherited from:
ExpectationsCreation
def forall[T, R](values: Iterable[T])(f: T => R)(using evidence$11: AsResult[R]): Result

verify the function f for all the values, stopping after the first failure, where the PartialFunction is defined

verify the function f for all the values, stopping after the first failure, where the PartialFunction is defined

Attributes

Inherited from:
MatcherImplicits
def forallWhen[T, R](values: Iterable[T])(f: PartialFunction[T, R])(using evidence$12: AsResult[R]): Result

Attributes

Inherited from:
MatcherImplicits
def foreach[T, R](values: Iterable[T])(f: T => R)(using evidence$13: AsResult[R]): Result

verify the function f for all the values, and collect all failures

verify the function f for all the values, and collect all failures

Attributes

Inherited from:
MatcherImplicits
def foreachWhen[T, R](values: Iterable[T])(f: PartialFunction[T, R])(using evidence$14: AsResult[R]): Result

verify the function f for all the values, and collect all failures, where the PartialFunction is defined

verify the function f for all the values, and collect all failures, where the PartialFunction is defined

Attributes

Inherited from:
MatcherImplicits
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

Attributes

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

Attributes

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

Attributes

Inherited from:
MatchResultStackTrace
def theBlock(t: => Nothing): Expectable[Nothing]

Attributes

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

Attributes

Inherited from:
ExpectationsCreation

Extensions

Inherited extensions

extension [T, S](f: T => S)(f: T => S)
def ^^(m: Matcher[S]): Matcher[T]

this extension provides an inverted syntax to adapt matchers to make the adaptation more readable in some cases:

this extension provides an inverted syntax to adapt matchers to make the adaptation more readable in some cases:

  • def haveExtension(extension: =>String) = ((_:File).getPath) ^^ endWith(extension)

Attributes

Inherited from:
MatcherImplicits
extension [T, R](values: Iterable[T])(values: Iterable[T])(using evidence$3: AsResult[R])
def atLeast(n: Times)(f: T => R): Result

Extend collections to check all their elements

Extend collections to check all their elements

Attributes

Inherited from:
MatcherImplicits
extension [T, R](values: Iterable[T])(values: Iterable[T])(using evidence$1: AsResult[R])
def atLeastOnce(f: T => R): Result

Extend collections to check all their elements

Extend collections to check all their elements

Attributes

Inherited from:
MatcherImplicits
extension [T, R](values: Iterable[T])(values: Iterable[T])(using evidence$6: AsResult[R])
def atMost(n: Int)(f: T => R): Result

Extend collections to check all their elements

Extend collections to check all their elements

Attributes

Inherited from:
MatcherImplicits
extension [T, R](values: Iterable[T])(values: Iterable[T])(using evidence$2: AsResult[R])
def atMostOnce(f: T => R): Result

Extend collections to check all their elements

Extend collections to check all their elements

Attributes

Inherited from:
MatcherImplicits
extension [T, R](values: Iterable[T])(values: Iterable[T])(using evidence$9: AsResult[R])
def exactly(n: Times)(f: T => R): Result

Extend collections to check all their elements

Extend collections to check all their elements

Attributes

Inherited from:
MatcherImplicits
extension [T, R](values: Iterable[T])(values: Iterable[T])(using evidence$8: AsResult[R])
def between(min: Int, max: Int)(f: T => R): Result

Extend collections to check all their elements

Extend collections to check all their elements

Attributes

Inherited from:
MatcherImplicits
extension [T, R](values: Iterable[T])(values: Iterable[T])(using evidence$10: AsResult[R])
def exactly(n: Int)(f: T => R): Result

Extend collections to check all their elements

Extend collections to check all their elements

Attributes

Inherited from:
MatcherImplicits
extension [T, R](values: Iterable[T])(values: Iterable[T])(using evidence$5: AsResult[R])
def atMost(n: Times)(f: T => R): Result

Extend collections to check all their elements

Extend collections to check all their elements

Attributes

Inherited from:
MatcherImplicits
extension [T, R](values: Iterable[T])(values: Iterable[T])(using evidence$7: AsResult[R])
def between(min: Times, max: Times)(f: T => R): Result

Extend collections to check all their elements

Extend collections to check all their elements

Attributes

Inherited from:
MatcherImplicits
extension [T, R](values: Iterable[T])(values: Iterable[T])(using evidence$4: AsResult[R])
def atLeast(n: Int)(f: T => R): Result

Extend collections to check all their elements

Extend collections to check all their elements

Attributes

Inherited from:
MatcherImplicits