Class XmlAssertions

java.lang.Object
de.hybris.platform.subscriptionfacades.util.XmlAssertions

public class XmlAssertions extends Object
  • 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 message
      targetXml - the target XML to apply the XPath expression to
      xPathExpression - the XPath expression to apply
      expectedValue - 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 message
      targetXml - the target XML to apply the XPath expression to
      xPathExpression - the XPath expression to apply
      expectedValue - the expected value
      transformation - resource path to an XML transformation to be applied to both expected value and target XML
    • assertXmlEqual

      public static void assertXmlEqual(String message, String expectedXml, String actualXml)
      Asserts that two XML snippets are equal.
      Parameters:
      message - failure message
      expectedXml - 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 message
      expectedXml - 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

      public static void assertXmlEqual(String expectedXml, String actualXml)
      Asserts that two XML snippets are equal.
      Parameters:
      expectedXml - the expected XML
      actualXml - the actual XML