alias for \ using the node label only
alias for textIs
alias for textMatches
alias for \\ using the node label only
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
checks that the nodes
satisfy the functions
checks that the nodes
satisfy the functions
a MatchResult describing the outcome of the match
checks that the nodes
satisfy the functions
checks that the nodes
satisfy the functions
a MatcherResult
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
do an exact match on attributes and attributes values
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
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
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 Match Result from another result
a MatchResult copied on another one, but with a different expectable
a MatchResult with an okMessage, a koMessage, the expectable value and details about the failure if any
a MatchResult with an okMessage, a koMessage, the expectable value and the expected/actual values as string to display a failure comparison if necessary
a MatchResult with an okMessage, a koMessage and the expectable value
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
specify the value of the node text
specify the value of the node text
only apply this matcher if the condition is false
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
only apply this matcher if the condition is true
The XmlMatcher class matches an xml Node, or a list of Nodes against a list of search functions, which can either search for:
XmlMatchers can be "chained" by using the \ or the \\ methods. In that case, the resulting matcher has a new search function which tries to match the result of the preceding function. For example
will be ok.