Top Description Fields Constructors Methods
org.testng.xml

pack-priv Class DefaultXmlWeaver

extends Object
implements IWeaveXml
Class Inheritance
All Implemented Interfaces
org.testng.xml.IWeaveXml
Known Direct Subclasses
org.testng.xml.CommentDisabledXmlWeaver
Static Imports
org.testng.collections.CollectionUtils.hasElements, org.testng.internal.Utils.isStringNotEmpty, org.testng.xml.XmlSuite.*

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 Summary

Modifier and TypeField and Description
private final String
private static final String
private static final String
TESTNG_DTD

The name of the TestNG DTD.

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
DefaultXmlWeaver(String defaultComment)

Method Summary

Modifier and TypeMethod and Description
public String
asXml(XmlSuite
- The XmlSuite that needs to be transformed to a String.
xmlSuite
)

Implements org.testng.xml.IWeaveXml.asXml.

Helps represent the contents of XmlSuite as a String.
public String
asXml(XmlTest
- The XmlTest that needs to be transformed to a String.
xmlTest
,
String
- The indentation.
indent
)

Implements org.testng.xml.IWeaveXml.asXml.

Helps represent the contents of XmlTest as a String.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

defaultCommentback to summary
private final String defaultComment
HTTPS_TESTNG_DTD_URLback to summary
private static final String HTTPS_TESTNG_DTD_URL
TESTNG_DTDback to summary
private static final String TESTNG_DTD

The name of the TestNG DTD.

Constructor Detail

DefaultXmlWeaverback to summary
pack-priv DefaultXmlWeaver()
DefaultXmlWeaverback to summary
pack-priv DefaultXmlWeaver(String defaultComment)

Method Detail

asXmlback to summary
public String asXml(XmlSuite xmlSuite)

Implements org.testng.xml.IWeaveXml.asXml.

Doc from org.testng.xml.IWeaveXml.asXml.

Helps represent the contents of XmlSuite as a String.

Parameters
xmlSuite:XmlSuite

- The XmlSuite that needs to be transformed to a String.

Returns:String

- The String representation

Annotations
@Override
asXmlback to summary
public String asXml(XmlTest xmlTest, String indent)

Implements org.testng.xml.IWeaveXml.asXml.

Doc from org.testng.xml.IWeaveXml.asXml.

Helps represent the contents of XmlTest as a String.

Parameters
xmlTest:XmlTest

- The XmlTest that needs to be transformed to a String.

indent:String

- The indentation.

Returns:String

- The String representation

Annotations
@Override