cookercucumber_parser.featureParserFactory.DocStringUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cooker-maven-plugin Show documentation
Show all versions of cooker-maven-plugin Show documentation
Derives smallest Feature File, Allows Data from Excel(xls and xlsx) and Also provides a clear and
concise reporting
package cookercucumber_parser.featureParserFactory;
import gherkin.ast.DocString;
public class DocStringUtils implements DocStringI {
private DocString docString = null;
private StringBuilder result = new StringBuilder();
public DocStringUtils(DocString pDocString) {
this.docString = pDocString;
}
/**
* Read the Docstring Object and Parse it and get it's Content in as String
* Author : Manjunath Prabhakar ([email protected])
*
* @return String Content of Docstring Object
*/
public String getDocStringData() {
try {
String docStringContent = docString.getContent();
String docStringContentType = docString.getContentType();
String sCover = "\"\"\"";
String docStringData = sCover + "\n" + docStringContent + "\n" + sCover;
this.result.append(docStringData);
this.result.append(System.getProperty("line.separator")); // Append New Line
} catch (Exception e) {
e.printStackTrace();
}
return String.valueOf(this.result);
}
}