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 value a: Expectable[T].
The result of a match is a Result
Matchers can be composed.
Implementation notes:
the parameter to the apply method must be a by-name parameter. This allows some values to be evaluated only when necessary.
However in the implementation of the apply function, it must be taken care of not evaluating the parameter twice. Assigning it to a val is the solution to this issue.
a Pending Result 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 Skipped Result if this matcher fails, prefixing the failure message with a skip message. If the skip message is empty, only the failure message is printed
throw a FailureException if this matcher fails prefixing the failure message with a message. If the message is empty, only the failure message is printed
throw a FailureException if this matcher fails prefixing the failure message with a message. If the message is empty, only the failure message is printed