public class XmlExpectationsHelper extends Object
| Constructor and Description |
|---|
XmlExpectationsHelper() |
| Modifier and Type | Method and Description |
|---|---|
void |
assertNode(String content,
Matcher<? super Node> matcher)
|
void |
assertSource(String content,
Matcher<? super Source> matcher)
|
void |
assertXmlEqual(String expected,
String actual)
Parse the expected and actual content strings as XML and assert that the
two are "similar" -- i.e.
|
public void assertNode(String content, Matcher<? super Node> matcher) throws Exception
Exceptionpublic void assertSource(String content, Matcher<? super Source> matcher) throws Exception
Exceptionpublic void assertXmlEqual(String expected, String actual) throws Exception
Use of this method assumes the XMLUnit library is available.
expected - the expected XML contentactual - the actual XML contentExceptionMockMvcResultMatchers.xpath(String, Object...),
MockMvcResultMatchers.xpath(String, Map, Object...)