MatchersCreation

Companion:
object
class Object
trait Matchable
class Any

Type members

Classlikes

implicit class AdaptFunction[T, S](f: T => S)

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

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

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

Implicits

Implicits

final implicit def AdaptFunction[T, S](f: T => S): AdaptFunction[T, S]

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

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

  • def haveExtension(extension: =>String) = ((_:File).getPath) ^^ endWith(extension)
implicit def functionAndKoMessageToMatcher[T](f: (T => Boolean, T => String)): Matcher[T]

This method transforms a function to a Matcher

This method transforms a function to a Matcher

implicit def functionAndMessagesToMatcher[T](f: (T => Boolean, T => String, T => String)): Matcher[T]

This method transforms a function, with function descriptors to a Matcher

This method transforms a function, with function descriptors to a Matcher

implicit def functionToMatcher[T](f: (T => Boolean, String)): Matcher[T]

This method transforms a function to a Matcher

This method transforms a function to a Matcher

implicit def functionToMatcher2[T](f: (T => Boolean, String, String)): Matcher[T]

This method transforms a function to a Matcher

This method transforms a function to a Matcher

implicit def matchResultFunctionToMatcher[T, R : AsResult](f: T => R): Matcher[T]

This method transforms a function returning a Result to a Matcher

This method transforms a function returning a Result to a Matcher

implicit def pairFunctionToMatcher[T](f: T => (Boolean, String)): Matcher[T]

This method transforms a function returning a pair (Boolean, String for ko message) to a Matcher

This method transforms a function returning a pair (Boolean, String for ko message) to a Matcher

implicit def stringMatcherFunctionToBynameMatcherFunction[T, R](f: T => Matcher[R]): (=> T) => Matcher[R]

this allows a function returning a matcher to be used where the same function with a byname parameter is expected

this allows a function returning a matcher to be used where the same function with a byname parameter is expected

implicit def tripletFunctionToMatcher[T](f: T => (Boolean, String, String)): Matcher[T]

This method transforms a function returning a triplet (Boolean, String for ok message, String for ko message) to a Matcher

This method transforms a function returning a triplet (Boolean, String for ok message, String for ko message) to a Matcher