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
Exception
public void assertSource(String content, Matcher<? super Source> matcher) throws Exception
Exception
public 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 contentException
MockMvcResultMatchers.xpath(String, Object...)
,
MockMvcResultMatchers.xpath(String, Map, Object...)