Tabnine Logo
XMLStringBuffer.getStringBuffer
Code IndexAdd Tabnine to your IDE (free)

How to use
getStringBuffer
method
in
org.testng.reporters.XMLStringBuffer

Best Java code snippets using org.testng.reporters.XMLStringBuffer.getStringBuffer (Showing top 14 results out of 315)

origin: org.testng/testng

 /**
  * Saves the content of the string buffer to the specified file.
  *
  * @param file the file to write to.
  * @param content the content to write to the file.
  */
 protected void saveSuiteContent(final File file, final XMLStringBuffer content) {
  try (OutputStreamWriter fw = new OutputStreamWriter(new FileOutputStream(file), Charset.forName("UTF-8"))) {
   fw.write(content.getStringBuffer().toString());
  } catch (IOException ioe) {
   // TODO CQ is this normal to swallow exception here
   LOGGER.error("IO Exception", ioe);
  }
 }
}
origin: cbeust/testng

 /**
  * Saves the content of the string buffer to the specified file.
  *
  * @param file the file to write to.
  * @param content the content to write to the file.
  */
 protected void saveSuiteContent(final File file, final XMLStringBuffer content) {
  try (OutputStreamWriter fw =
    new OutputStreamWriter(new FileOutputStream(file), Charset.forName("UTF-8"))) {
   fw.write(content.getStringBuffer().toString());
  } catch (IOException ioe) {
   // TODO CQ is this normal to swallow exception here
   LOGGER.error("IO Exception", ioe);
  }
 }
}
origin: org.testng/testng

 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();
 }
}
origin: org.testng/testng

xsb.getStringBuffer().append(m.toXml(indent + "    "));
origin: cbeust/testng

 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();
 }
}
origin: org.testng/testng

xsb.getStringBuffer().append(d.toXml(indent2));
  xsb.getStringBuffer().append(m_run.toXml(indent2));
xsb.getStringBuffer().append(d.toXml(indent2));
origin: cbeust/testng

public String toXml(String indent) {
 XMLStringBuffer xsb = new XMLStringBuffer(indent);
 Properties prop = new Properties();
 prop.setProperty("name", getName());
 boolean hasMethods = !m_includedMethods.isEmpty() || !m_excludedMethods.isEmpty();
 boolean hasParameters = !m_parameters.isEmpty();
 if (hasParameters || hasMethods) {
  xsb.push("class", prop);
  XmlUtils.dumpParameters(xsb, m_parameters);
  if (hasMethods) {
   xsb.push("methods");
   for (XmlInclude m : getIncludedMethods()) {
    xsb.getStringBuffer().append(m.toXml(indent + "    "));
   }
   for (String m : getExcludedMethods()) {
    Properties p = new Properties();
    p.setProperty("name", m);
    xsb.addEmptyElement("exclude", p);
   }
   xsb.pop("methods");
  }
  xsb.pop("class");
 } else {
  xsb.addEmptyElement("class", prop);
 }
 return xsb.toXML();
}
origin: cbeust/testng

xsb.getStringBuffer().append(d.toXml(indent2));
xsb.getStringBuffer().append(m_run.toXml(indent2));
xsb.getStringBuffer().append(d.toXml(indent2));
origin: org.testng/testng

xsb.push("method-selectors");
for (XmlMethodSelector selector: xmlTest.getMethodSelectors()) {
  xsb.getStringBuffer().append(selector.toXml(indent + "    "));
  xsb.getStringBuffer().append(pack.toXml("      "));
xsb.push("classes");
for (XmlClass cls : xmlTest.getXmlClasses()) {
  xsb.getStringBuffer().append(cls.toXml(indent + "    "));
origin: org.testng/testng

    xsb.getStringBuffer().append(pack.toXml("    "));
  xsb.getStringBuffer().append(xmlSuite.getXmlMethodSelectors().toXml("  "));
} else {
    xsb.push("method-selectors");
    for (XmlMethodSelector selector : xmlSuite.getMethodSelectors()) {
      xsb.getStringBuffer().append(selector.toXml("  "));
  xsb.getStringBuffer().append(xmlSuite.getGroups().toXml("  "));
  xsb.getStringBuffer().append(test.toXml("  "));
origin: cbeust/testng

xsb.push("method-selectors");
for (XmlMethodSelector selector : xmlTest.getMethodSelectors()) {
 xsb.getStringBuffer().append(selector.toXml(indent + "    "));
 xsb.getStringBuffer().append(pack.toXml("      "));
xsb.push("classes");
for (XmlClass cls : xmlTest.getXmlClasses()) {
 xsb.getStringBuffer().append(cls.toXml(indent + "    "));
origin: cbeust/testng

  xsb.getStringBuffer().append(pack.toXml("    "));
 xsb.getStringBuffer().append(xmlSuite.getXmlMethodSelectors().toXml("  "));
} else {
  xsb.push("method-selectors");
  for (XmlMethodSelector selector : xmlSuite.getMethodSelectors()) {
   xsb.getStringBuffer().append(selector.toXml("  "));
 xsb.getStringBuffer().append(xmlSuite.getGroups().toXml("  "));
 xsb.getStringBuffer().append(test.toXml("  "));
origin: cbeust/testng-eclipse

fw = new FileWriter(file);
bw = new BufferedWriter(fw);
bw.write(xmlBuffer.getStringBuffer().toString());
bw.flush();
origin: cbeust/testng-eclipse

protected void saveSuiteContent(final File file, final XMLStringBuffer content) {
 FileOutputStream fileOutputStream = null;
 BufferedOutputStream bufferedOutputStream = null;
 OutputStreamWriter osw = null;
 try {
  fileOutputStream = new FileOutputStream(file);
  bufferedOutputStream = new BufferedOutputStream(fileOutputStream);
  // use utf8 to solve special character problem
  osw = new OutputStreamWriter(bufferedOutputStream, Charset.forName("UTF-8"));
  osw.write(content.getStringBuffer().toString());
 } catch (IOException ioException) {
  TestNGPlugin.log(ioException);
 } finally {
   try {
     if (osw != null) osw.close();
     if (bufferedOutputStream != null) bufferedOutputStream.close();
     if (fileOutputStream != null) fileOutputStream.close();
   } catch (Exception e) {
    TestNGPlugin.log(e);
   }
 }
}
org.testng.reportersXMLStringBuffergetStringBuffer

Popular methods of XMLStringBuffer

  • <init>
  • pop
    Pop the last pushed element and throws an AssertionError if it doesn't match the corresponding tag t
  • push
  • addEmptyElement
  • toXML
  • addCDATA
    Add a CDATA tag.
  • addComment
  • addOptional
  • addRequired
  • setDocType
    Set the doctype for this document.
  • addString
  • createProperties
  • addString,
  • createProperties,
  • getCurrentIndent,
  • init,
  • setDefaultComment,
  • setXmlDetails,
  • toWriter

Popular in Java

  • Start an intent from android
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onRequestPermissionsResult (Fragment)
  • requestLocationUpdates (LocationManager)
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • BoxLayout (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now