类 XmlExpectationsHelper
java.lang.Object
cn.taketoday.test.util.XmlExpectationsHelper
A helper class for assertions on XML content.
- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
-
嵌套类概要
嵌套类修饰符和类型类说明private static classInner class to prevent hard dependency on XML Unit. -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidassertNode(String content, org.hamcrest.Matcher<? super Node> matcher) Parse the content asNodeand apply aMatcher.voidassertSource(String content, org.hamcrest.Matcher<? super Source> matcher) Parse the content asDOMSourceand apply aMatcher.voidassertXmlEqual(String expected, String actual) Parse the expected and actual content strings as XML and assert that the two are "similar" -- i.e. they contain the same elements and attributes regardless of order.private DocumentparseXmlString(String xml)
-
构造器详细资料
-
XmlExpectationsHelper
public XmlExpectationsHelper()
-
-
方法详细资料
-
assertNode
Parse the content asNodeand apply aMatcher.- 抛出:
Exception
-
parseXmlString
- 抛出:
Exception
-
assertSource
public void assertSource(String content, org.hamcrest.Matcher<? super Source> matcher) throws Exception Parse the content asDOMSourceand apply aMatcher.- 抛出:
Exception- 另请参阅:
-
assertXmlEqual
Parse the expected and actual content strings as XML and assert that the two are "similar" -- i.e. they contain the same elements and attributes regardless of order.Use of this method assumes the XMLUnit library is available.
- 参数:
expected- the expected XML contentactual- the actual XML content- 抛出:
Exception
-