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