Class DefaultXmlWeaver

java.lang.Object
org.testng.xml.DefaultXmlWeaver
All Implemented Interfaces:
IWeaveXml
Direct Known Subclasses:
CommentDisabledXmlWeaver

class DefaultXmlWeaver extends Object implements IWeaveXml
This class provides String representation of both XmlSuite and XmlTest but adds an XML comment as the test name and suite name at the end of the corresponding tags.
  • Field Details

    • defaultComment

      private final String defaultComment
  • Constructor Details

    • DefaultXmlWeaver

      DefaultXmlWeaver()
    • DefaultXmlWeaver

      DefaultXmlWeaver(String defaultComment)
  • Method Details

    • asXml

      public String asXml(XmlSuite xmlSuite)
      Description copied from interface: IWeaveXml
      Helps represent the contents of XmlSuite as a String.
      Specified by:
      asXml in interface IWeaveXml
      Parameters:
      xmlSuite - - The XmlSuite that needs to be transformed to a String.
      Returns:
      - The String representation
    • asXml

      public String asXml(XmlTest xmlTest, String indent)
      Description copied from interface: IWeaveXml
      Helps represent the contents of XmlTest as a String.
      Specified by:
      asXml in interface IWeaveXml
      Parameters:
      xmlTest - - The XmlTest that needs to be transformed to a String.
      indent - - The indentation.
      Returns:
      - The String representation