Skip to content

Evaluate XPath Hamcrest Matcher#66

Merged
bodewig merged 1 commit into
xmlunit:masterfrom
mariusneo:evaluate-xpath-matcher
Mar 17, 2016
Merged

Evaluate XPath Hamcrest Matcher#66
bodewig merged 1 commit into
xmlunit:masterfrom
mariusneo:evaluate-xpath-matcher

Conversation

@mariusneo

Copy link
Copy Markdown
Contributor

Added hamcrest Matcher to verify whether the evaluation of the XPath expression specified corresponds to the specified value matcher in provided xml input.

Design of this matcher is similar to org.hamcrest.xml.HasXPath matcher, but it provides the ability to match not only org.w3c.dom.Node instance, but instead anything supported by org.xmlunit.build.Input.from(Object)

…expression specified corresponds to the specified value matcher in provided xml input.
@bodewig

bodewig commented Mar 17, 2016

Copy link
Copy Markdown
Member

Very elegant solution, many thanks.

Do you think you could update the user guide with examples for this one and the HasXPathMatcher?

@bodewig bodewig closed this Mar 17, 2016
@bodewig bodewig added this to the 2.1.0 milestone Mar 17, 2016
@bodewig bodewig reopened this Mar 17, 2016
bodewig added a commit that referenced this pull request Mar 17, 2016
@bodewig bodewig merged commit 7b0dd7d into xmlunit:master Mar 17, 2016
@bodewig

bodewig commented Mar 17, 2016

Copy link
Copy Markdown
Member

Note to self: first merge the PR, then comment or you close it by accident.

@mariusneo

Copy link
Copy Markdown
Contributor Author

Hi @bodewig . Sure, I can take care of updating the docs. I will make an additional PR until tommorow.

@bodewig

bodewig commented Mar 17, 2016

Copy link
Copy Markdown
Member

Unless I've messed things up - which is certainly possible - you should be able to edit the Wiki directly. I don't think github supports PRs against Wikis (even though they are git repos as well).

If you prefer a PR-like workflow, I can certainly merge a branch of a clone of the Wiki from your personal space.

@mariusneo

Copy link
Copy Markdown
Contributor Author

@bodewig I've added the XPath Matcher related guideline here :
https://github.com/xmlunit/user-guide/wiki/XPath-Support

@bodewig

bodewig commented Mar 18, 2016

Copy link
Copy Markdown
Member

Looks good, many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants