All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.testng.xml.XmlMethodSelectors Maven / Gradle / Ivy

There is a newer version: 7.10.2
Show newest version
package org.testng.xml;

import static org.testng.collections.CollectionUtils.hasElements;

import java.util.List;
import org.testng.collections.Lists;
import org.testng.reporters.XMLStringBuffer;

public class XmlMethodSelectors {

  private List m_methodSelectors = Lists.newArrayList();

  public XmlMethodSelectors() {}

  public List getMethodSelectors() {
    return m_methodSelectors;
  }

  public void setMethodSelector(XmlMethodSelector xms) {
    m_methodSelectors.add(xms);
  }

  public String toXml(String indent) {
    XMLStringBuffer xsb = new XMLStringBuffer(indent);
    if (hasElements(m_methodSelectors)) {
      xsb.push("method-selectors");
      for (XmlMethodSelector selector : m_methodSelectors) {
        xsb.getStringBuffer().append(selector.toXml(indent + "  "));
      }

      xsb.pop("method-selectors");
    }
    return xsb.toXML();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy