public class IsEquivalentTo extends org.hamcrest.TypeSafeMatcher<Source>
Matchers for comparing XML for "equivalence" and "similarity." Two documents are considered to be "equivalent" if they contain the same elements in the same order. Also, namespace prefixes must be the same. Attribute order, comments, whitespace, CDATA vs. text usage is not considered.
Two documents are considered to be "similar" if the the content of the nodes in the documents are the same, but minor differences exist e.g. sequencing of sibling elements, values of namespace prefixes, use of implied attribute values.
| Modifier and Type | Method and Description |
|---|---|
void |
describeTo(org.hamcrest.Description description) |
static org.hamcrest.Matcher<Source> |
equivalentTo(Source control) |
static org.hamcrest.Matcher<Source> |
isEquivalentTo(Source control) |
static org.hamcrest.Matcher<Source> |
isSimilarTo(Source control) |
boolean |
matchesSafely(Source source) |
static org.hamcrest.Matcher<Source> |
similarTo(Source control) |
describeMismatch, describeMismatchSafely, matchesCopyright © 2010-2013. All Rights Reserved.