this implicit provides an inverted syntax to adapt matchers to make the adaptation more readable in some cases: - def haveExtension(extension: =>String) = ((_:File).
The SeqMatcher
class is a matcher matching a sequence 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.
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 overriden to throw exceptions when checking the match result
this method can be overriden to throw exceptions when checking the match result
this method can be overriden to throw exceptions when checking the match result
this method can be overriden to throw exceptions when checking the match result
this method can be overriden to throw exceptions when checking the result
this method can be overriden 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 overriden to intercept a MatchResult and change its message before it is thrown
this method can be overriden to intercept a MatchResult and change its message before it is thrown
implicit typeclass instance to create examples from MatchResults
implicit typeclass instance to create examples from MatchResults
This method transform a function returning a Result to a Matcher
implicit typeclass instance to create examples from a sequence of MatchResults
implicit typeclass instance to create examples from a sequence of MatchResults
a Matcher[T] can check a value
a Matcher[T] can check a value
replace the first occurrence of a verb in the negations table with its negation.
replace the first occurrence of a verb in the negations table with its negation.
We first try to negate an existing negation
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
implicit definition to transform a Seq of MatchResults to a Result
implicit definition to transform a Seq of MatchResults to a Result
this allows a function returning a matcher to be used where the same function with a byname parameter is expected
implicit definition to accept any boolean value as a Result This avoids writing b must beTrue
implicit definition to accept any boolean value as a Result This avoids writing b must beTrue
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