apply this matcher to an Expectable
apply this matcher to an Expectable
a MatchResult describing the outcome of the match
Adapt a matcher to another.
Adapt a matcher to another.
ex: be_==("message") ^^ (_.getMessage aka "trimmed")
can be applied to an exception
The dummy value is used to help to disambiguate with the overloaded ^^ function
Adapt a matcher to another.
Adapt a matcher to another.
ex: be_==("message") ^^ (_.getMessage)
can be applied to an exception
the logical and between 2 matchers
the logical and between 2 matchers
MatchResult.and
a matcher that needs to eventually match, after a given number of retries and a sleep time
a matcher that needs to eventually match, after 40 retries and a sleep time of 100 milliseconds
This method can be used to create a failed match result
This method can be used to create a failed match result
when the condition is true the matcher is applied, when it's false, the matcher must fail
The lazily
operator returns a Matcher which will match a function returning the expected value
a Matcher with no messages
negate a Matcher
negate a Matcher
MatchResult.not
the logical or between 2 matchers
the logical or between 2 matchers
MatchResult.or
a Pending MatchResult if this matcher fails, modifying the failure message with a pending message.
a Pending MatchResult if this matcher fails, prefixing the failure message with a pending message. If the pending message is empty, only the failure message is printed
a Pending MatchResult if this matcher fails
a Skip MatchResult if this matcher fails, modifying the failure message with a skip message.
a Skip MatchResult if this matcher fails, prefixing the failure message with a skip message. If the skip message is empty, only the failure message is printed
a Skip MatchResult if this matcher fails
a MatchResult using the messages embedded in a MatchResultMessage (i.e. an accumulation of messages from other matches)
a MatchResult copied on another one, but with a different expectable
This method can be used to evaluate a boolean condition and return an appropriate MatchResult
This method can be used to evaluate a boolean condition and return an appropriate MatchResult
a MatchResult with an okMessage, a koMessage, the expectable value and the expected/actual values as string to display a failure comparison if necessary
This method uses a triplet instead of separated arguments
This method uses a triplet instead of separated arguments
a MatchResult with an okMessage, a koMessage and the expectable value
This method can be used to evaluate a boolean condition and return an appropriate MatchResult
This method can be used to evaluate a boolean condition and return an appropriate MatchResult
a MatchResult with an okMessage, a koMessage and the expectable value
set a new failure message of a matcher
This method can be used to create a successful match result
This method can be used to create a successful match result
a test function corresponding to this matcher
only apply this matcher if the condition is false
update the failure message of a matcher
only apply this matcher if the condition is true
The
Matcher
trait is the base trait for any Matcher.This trait can be extended to provide an appropriate
apply
method that will check an expectable valuea: Expectable[T]
.The result of a match is a MatchResult object (@see MatchResult).
Matchers can be composed.
Implementation notes: