XmlMatcher
The XmlMatcher class matches an xml Node, or a list of Nodes against a list of search functions, which can either search for:
-
a given direct child, with its label and/or attributes and/or attributes names and values
-
a given child, direct or not (maybe deeply nested), with its label and/or attributes and/or attributes names and values
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
must \\("c").\("d")
will be ok.
must \("c").("d")
Attributes
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalstrait Matcher[Seq[Node]]class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
alias for \ using the node label only
alias for \ using the node label only
Attributes
alias for textIs
alias for textIs
Attributes
alias for textMatches
alias for textMatches
Attributes
alias for \ using the node label only
alias for \ using the node label only
Attributes
checks that the nodes
satisfy the functions
checks that the nodes
satisfy the functions
Attributes
checks that the nodes
satisfy the functions
checks that the nodes
satisfy the functions
Attributes
- Returns:
a MatcherResult
do an exact match on attributes and attributes values
do an exact match on attributes and attributes values
Attributes
specify the value of the node text
specify the value of the node text
Attributes
specify the value of the node text
specify the value of the node text
Attributes
Inherited methods
Adapt a matcher to another. ex: be_==("message") ^^ (_.getMessage aka "trimmed")
can be applied to an exception
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
Attributes
- Inherited from:
- Matcher
Adapt a matcher to another. ex: be_==("message") ^^ (_.getMessage)
can be applied to an exception
Adapt a matcher to another. ex: be_==("message") ^^ (_.getMessage)
can be applied to an exception
Attributes
- Inherited from:
- Matcher
the logical and between 2 matchers
the logical and between 2 matchers
Attributes
- See also:
Result.and
- Inherited from:
- Matcher
Attributes
- sleep
the function applied on the retry number (first is 1)
- Returns:
a matcher that needs to eventually match, after a given number of retries and a sleep time
(aResult === expected).eventually(retries = 2, _ * 100.milliseconds)
- Inherited from:
- Matcher
Attributes
- Returns:
a matcher that needs to eventually match, after a given number of retries and a sleep time
- Inherited from:
- Matcher
Attributes
- Returns:
a matcher that needs to eventually match, after 40 retries and a sleep time of 100 milliseconds
- Inherited from:
- Matcher
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
Attributes
- Inherited from:
- Matcher
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
Attributes
- Inherited from:
- Matcher
Attributes
- Returns:
a Matcher with no messages
- Inherited from:
- Matcher
negate a Matcher
negate a Matcher
Attributes
- See also:
Result.not
- Inherited from:
- Matcher
the logical or between 2 matchers
the logical or between 2 matchers
Attributes
- See also:
Result.or
- Inherited from:
- Matcher
Attributes
- Returns:
a Pending Result if this matcher fails, modifying the failure message with a pending message.
- Inherited from:
- Matcher
Attributes
- Returns:
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
- Inherited from:
- Matcher
Attributes
- Returns:
a Pending Result if this matcher fails
- Inherited from:
- Matcher
Attributes
- Returns:
a Skipped Result if this matcher fails, modifying the failure message with a skip message.
- Inherited from:
- Matcher
Attributes
- Returns:
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
- Inherited from:
- Matcher
Attributes
- Returns:
a Skipped result if this matcher fails
- Inherited from:
- Matcher
throw a FailureException if this matcher fails, modifying the failure message with a message.
throw a FailureException if this matcher fails, modifying the failure message with a message.
Attributes
- Inherited from:
- Matcher
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
Attributes
- Inherited from:
- Matcher
throw a FailureException if this matcher fails
throw a FailureException if this matcher fails
Attributes
- Inherited from:
- Matcher
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Attributes
- Returns:
set a new failure message of a matcher
- Inherited from:
- Matcher
Attributes
- Returns:
a test function corresponding to this matcher
- Inherited from:
- Matcher
only apply this matcher if the condition is false
only apply this matcher if the condition is false
Attributes
- Inherited from:
- Matcher
Attributes
- Returns:
update the failure message of a matcher
- Inherited from:
- Matcher
only apply this matcher if the condition is true
only apply this matcher if the condition is true
Attributes
- Inherited from:
- Matcher