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

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

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

origin: org.testng/testng

/**
 * TODO cquezel JavaDoc
 *
 * @return
 */
protected XMLStringBuffer createContentBuffer() {
 XMLStringBuffer suiteBuffer = new XMLStringBuffer();
 suiteBuffer.setDocType("suite SYSTEM \"" + Parser.TESTNG_DTD_URL + "\"");
 Properties attrs = new Properties();
 attrs.setProperty("parallel", XmlSuite.ParallelMode.NONE.toString());
 attrs.setProperty("name", m_suiteName);
 suiteBuffer.push("suite", attrs);
 if (m_parameters != null) {
  for (Map.Entry<String, String> entry : m_parameters.entrySet()) {
   Properties paramAttrs = new Properties();
   paramAttrs.setProperty("name", entry.getKey());
   paramAttrs.setProperty("value", entry.getValue());
   suiteBuffer.push("parameter", paramAttrs);
   suiteBuffer.pop("parameter");
  }
 }
 initContentBuffer(suiteBuffer);
 suiteBuffer.pop("suite");
 return suiteBuffer;
}
origin: cbeust/testng

/**
 * TODO cquezel JavaDoc
 *
 * @return
 */
protected XMLStringBuffer createContentBuffer() {
 XMLStringBuffer suiteBuffer = new XMLStringBuffer();
 suiteBuffer.setDocType("suite SYSTEM \"" + Parser.TESTNG_DTD_URL + "\"");
 Properties attrs = new Properties();
 attrs.setProperty("parallel", XmlSuite.ParallelMode.NONE.toString());
 attrs.setProperty("name", m_suiteName);
 suiteBuffer.push("suite", attrs);
 if (m_parameters != null) {
  for (Map.Entry<String, String> entry : m_parameters.entrySet()) {
   Properties paramAttrs = new Properties();
   paramAttrs.setProperty("name", entry.getKey());
   paramAttrs.setProperty("value", entry.getValue());
   suiteBuffer.push("parameter", paramAttrs);
   suiteBuffer.pop("parameter");
  }
 }
 initContentBuffer(suiteBuffer);
 suiteBuffer.pop("suite");
 return suiteBuffer;
}
origin: org.testng/testng

XMLStringBuffer xsb = new XMLStringBuffer();
xsb.setDefaultComment(defaultComment);
xsb.setDocType("suite SYSTEM \"" + Parser.TESTNG_DTD_URL + '\"');
Properties p = new Properties();
p.setProperty("name", xmlSuite.getName());
origin: cbeust/testng

XMLStringBuffer xsb = new XMLStringBuffer();
xsb.setDefaultComment(defaultComment);
xsb.setDocType("suite SYSTEM \"" + Parser.TESTNG_DTD_URL + '\"');
Properties p = new Properties();
p.setProperty("name", xmlSuite.getName());
origin: cbeust/testng-eclipse

private static XMLStringBuffer getSuiteBuffer(String name) {
 XMLStringBuffer xmlBuf = new XMLStringBuffer(); //$NON-NLS-1$
 xmlBuf.setDocType("suite SYSTEM " + Parser.TESTNG_DTD_URL);
 Properties attrs = new Properties();
 attrs.setProperty("name", name);
 xmlBuf.push("suite", attrs);
 return xmlBuf;
}
 
origin: cbeust/testng-eclipse

protected XMLStringBuffer createContentBuffer() {
 PreferenceStoreUtil storage =
   new PreferenceStoreUtil(TestNGPlugin.getDefault().getPreferenceStore());
 String suiteTemplateFile = storage.getXmlTemplateFile(m_projectName, false /* not only project */);
 XMLStringBuffer suiteBuffer = new XMLStringBuffer(); //$NON-NLS-1$
 suiteBuffer.setDocType("suite SYSTEM \"" + Parser.TESTNG_DTD_URL + "\"");
 if (!Utils.isStringEmpty(suiteTemplateFile)) {
  try {
   IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
   String resolvedXmlFile = manager.performStringSubstitution(suiteTemplateFile);
   if (!(new Path(resolvedXmlFile).isAbsolute()) && !Utils.isStringEmpty(workingDir)) {
    resolvedXmlFile = workingDir + "/" + resolvedXmlFile;
   }
   createXmlFileFromTemplate(suiteBuffer, resolvedXmlFile);
  } catch (CoreException e) {
   throw new RuntimeException("Failed to create TestNG suite from \"Template XML File\" '"
       + suiteTemplateFile + "': " + e.getMessage(), e);
  }
 } else {
  createXmlFileFromParameters(suiteBuffer);
 }
 // Done with the top of the XML file, now generate the <test> elements
 initContentBuffer(suiteBuffer);
 suiteBuffer.pop("suite");
 return suiteBuffer;
}
org.testng.reportersXMLStringBuffersetDocType

Javadoc

Set the doctype for this document.

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
  • getStringBuffer
  • addString
  • createProperties
  • addString,
  • createProperties,
  • getCurrentIndent,
  • init,
  • setDefaultComment,
  • setXmlDetails,
  • toWriter

Popular in Java

  • Updating database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • getApplicationContext (Context)
  • runOnUiThread (Activity)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Runner (org.openjdk.jmh.runner)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top Sublime Text plugins
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