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)
The SeqMatcher
class is a matcher matching a sequence of objects with a matcher returned by a function.
The SeqMatcher
class is a matcher matching a sequence of objects with a matcher returned by a function.
Usage: List(1, 2, 3) must ((beEqualTo(_:Int)).toSeq)(List(1, 2, 3))
The SetMatcher
class is a matcher matching a set of objects with a matcher returned by a function.
The SetMatcher
class is a matcher matching a set of objects with a matcher returned by a function.
Usage: List(1, 2, 3) must ((beEqualTo(_:Int)).toSet)(List(2, 1, 3)) }}}
Add functionalities to functions returning matchers so that they can be combined before taking a value and returning actual matchers
implicit definition to transform any MatchResult to a Result
implicit definition to transform any MatchResult to a Result
apply a matcher atLeast one value
verify the function f for at least one value
verify the function f for at least one value, where the PartialFunction is defined
apply a matcher atLeast one value
verify the function f for at least one value
verify the function f for at least one value, where the PartialFunction is defined
A value can be tested against another with the === operator.
A value can be tested against another with the === operator. It is equivalent to writing a must_== b
this method can be overridden to throw exceptions when checking the match result
this method can be overridden to throw exceptions when checking the match result
this method can be overridden to throw exceptions when checking the match result
this method can be overridden to throw exceptions when checking the match result
this method can be overridden to throw exceptions when checking the result
this method can be overridden to throw exceptions when checking the result
an Expectable with a description function
an Expectable with a description function
an Expectable with a description
an Expectable
an Expectable with a function to show the element T
describe a value with the aka method
describe a value with the aka method
a check of type T can be downcasted implicitly to a check of type S >: T
a check of type T can be downcasted implicitly to a check of type S >: T
apply a matcher for all values
verify the function f for all the values, stopping after the first failure
verify the function f for all the values, stopping after the first failure, where the PartialFunction is defined
apply a matcher foreach value
verify the function f for all the values, and collect all failures
verify the function f for all the values, and collect all failures, where the PartialFunction is defined
implicit definition to accept any MatchResult as a Boolean value.
implicit definition to accept any MatchResult as a Boolean value. It is true if the MatchResult is not an Error or a Failure
This method transform a function to a Matcher
This method transform a function, with function descriptors to a Matcher
a function returning an object having an AsResult instance can check a value
a function returning an object having an AsResult instance can check a value
This method transform a function to a Matcher
This method transform a function to a Matcher
this method can be overridden to intercept a MatchResult and change its message before it is thrown
this method can be overridden to intercept a MatchResult and change its message before it is thrown
This method transform a function returning a Result to a Matcher
a Matcher[T] can check a value
a Matcher[T] can check a value
This method transform a function returning a pair (Boolean, String for ko message) to a Matcher
a partial function returning an object having an AsResult instance can check a value
a partial function returning an object having an AsResult instance can check a value
the match result without any side-effects
implicit definition to transform a Seq of MatchResults to a Result
implicit definition to transform a Seq of MatchResults to a 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
this allows a function returning a matcher to be used where the same function with a byname parameter is expected
This method transform a function returning a triplet (Boolean, String for ok message, String for ko message) to a Matcher
an expected value can be used to check another value
an expected value can be used to check another value
This trait provides implicit definitions from MatchResults and Booleans to Results.
It also allows to:
- create matchers from functions - create matchers for seqs and sets from single matchers