Class XmlAssertions
java.lang.Object
de.hybris.platform.subscriptionfacades.util.XmlAssertions
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertXmlEqual(String expectedXml, String actualXml) Asserts that two XML snippets are equal.static voidassertXmlEqual(String message, String expectedXml, String actualXml) Asserts that two XML snippets are equal.static voidassertXmlEqual(String message, String expectedXml, String actualXml, String transformation) Asserts that two XML snippets are equal.static voidassertXPathEvaluatesTo(String message, String targetXml, String xPathExpression, String expectedValue) Asserts that the given XPath expression evaluates to the expected value when applied to the target XML.static voidassertXPathEvaluatesTo(String message, String targetXml, String xPathExpression, String expectedValue, String transformation) Asserts that the given XPath expression evaluates to the expected value when applied to the target XML.
-
Method Details
-
assertXPathEvaluatesTo
public static void assertXPathEvaluatesTo(String message, String targetXml, String xPathExpression, String expectedValue) Asserts that the given XPath expression evaluates to the expected value when applied to the target XML.- Parameters:
message- failure messagetargetXml- the target XML to apply the XPath expression toxPathExpression- the XPath expression to applyexpectedValue- the expected value
-
assertXPathEvaluatesTo
public static void assertXPathEvaluatesTo(String message, String targetXml, String xPathExpression, String expectedValue, String transformation) Asserts that the given XPath expression evaluates to the expected value when applied to the target XML. Before comparing the given XSL transformation is applied to the expected value as well as the targetXml.- Parameters:
message- failure messagetargetXml- the target XML to apply the XPath expression toxPathExpression- the XPath expression to applyexpectedValue- the expected valuetransformation- resource path to an XML transformation to be applied to both expected value and target XML
-
assertXmlEqual
Asserts that two XML snippets are equal.- Parameters:
message- failure messageexpectedXml- the expected XML (snippet)actualXml- the actual XML (snippet)
-
assertXmlEqual
public static void assertXmlEqual(String message, String expectedXml, String actualXml, String transformation) Asserts that two XML snippets are equal. Before comparing the given XSL transformation is applied to the expected as well as the actual XML.- Parameters:
message- failure messageexpectedXml- the expected XML (snippet)actualXml- the actual XML (snippet)transformation- resource path to an XML transformation to be applied to both expected and actual XML
-
assertXmlEqual
Asserts that two XML snippets are equal.- Parameters:
expectedXml- the expected XMLactualXml- the actual XML
-