Package org.springframework.test.util
Class XmlExpectationsHelper
java.lang.Object
org.springframework.test.util.XmlExpectationsHelper
A helper class for assertions on XML content.
- Since:
- 3.2
- Author:
- Rossen Stoyanchev
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidassertNode(String content, Matcher<? super Node> matcher) voidassertSource(String content, Matcher<? super Source> matcher) voidassertXmlEqual(String expected, String actual) Parse the expected and actual content strings as XML and assert that the two are "similar" -- i.e.
- 
Constructor Details- 
XmlExpectationsHelperpublic XmlExpectationsHelper()
 
- 
- 
Method Details- 
assertNode- Throws:
- Exception
 
- 
assertSource- Throws:
- Exception
- See Also:
 
- 
assertXmlEqualParse 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. - Parameters:
- expected- the expected XML content
- actual- the actual XML content
- Throws:
- Exception
- See Also:
 
 
-