/** * @deprecated Unused */ @Deprecated public int getFileFragmentationLevel() { return config.getFileFragmentationLevel(); }
/** @deprecated Unused */ @Deprecated public int getFileFragmentationLevel() { return config.getFileFragmentationLevel(); }
private void writeSuite(ISuite suite) { switch (config.getFileFragmentationLevel()) { case XMLReporterConfig.FF_LEVEL_NONE: writeSuiteToBuffer(rootBuffer, suite); break; case XMLReporterConfig.FF_LEVEL_SUITE: case XMLReporterConfig.FF_LEVEL_SUITE_RESULT: File suiteFile = referenceSuite(rootBuffer, suite); writeSuiteToFile(suiteFile, suite); break; default: throw new AssertionError("Unexpected value: " + config.getFileFragmentationLevel()); } }
private void writeSuite(ISuite suite) { switch (config.getFileFragmentationLevel()) { case XMLReporterConfig.FF_LEVEL_NONE: writeSuiteToBuffer(rootBuffer, suite); break; case XMLReporterConfig.FF_LEVEL_SUITE: case XMLReporterConfig.FF_LEVEL_SUITE_RESULT: File suiteFile = referenceSuite(rootBuffer, suite); writeSuiteToFile(suiteFile, suite); break; default: throw new AssertionError("Unexpected value: " + config.getFileFragmentationLevel()); } }
/** * Writes the specified ISuiteResult in the given XMLStringBuffer. Please consider that depending on the settings in * the <code>config</code> property it might generate an additional XML file with the actual content and only * reference the file with an <code>url</code> attribute in the passed XMLStringBuffer. * * @param xmlBuffer The XML buffer where to write or reference the suite result * @param suiteResult The <code>ISuiteResult</code> to serialize */ public void writeSuiteResult(XMLStringBuffer xmlBuffer, ISuiteResult suiteResult) { if (XMLReporterConfig.FF_LEVEL_SUITE_RESULT != config.getFileFragmentationLevel()) { writeAllToBuffer(xmlBuffer, suiteResult); } else { String parentDir = config.getOutputDirectory() + File.separatorChar + suiteResult.getTestContext().getSuite().getName(); File file = referenceSuiteResult(xmlBuffer, parentDir, suiteResult); XMLStringBuffer suiteXmlBuffer = new XMLStringBuffer(); writeAllToBuffer(suiteXmlBuffer, suiteResult); Utils.writeUtf8File(file.getAbsoluteFile().getParent(), file.getName(), suiteXmlBuffer.toXML()); } }
/** * Writes the specified ISuiteResult in the given XMLStringBuffer. Please consider that depending * on the settings in the <code>config</code> property it might generate an additional XML file * with the actual content and only reference the file with an <code>url</code> attribute in the * passed XMLStringBuffer. * * @param xmlBuffer The XML buffer where to write or reference the suite result * @param suiteResult The <code>ISuiteResult</code> to serialize */ public void writeSuiteResult(XMLStringBuffer xmlBuffer, ISuiteResult suiteResult) { if (XMLReporterConfig.FF_LEVEL_SUITE_RESULT != config.getFileFragmentationLevel()) { writeAllToBuffer(xmlBuffer, suiteResult); } else { String parentDir = config.getOutputDirectory() + File.separatorChar + suiteResult.getTestContext().getSuite().getName(); File file = referenceSuiteResult(xmlBuffer, parentDir, suiteResult); XMLStringBuffer suiteXmlBuffer = new XMLStringBuffer(); writeAllToBuffer(suiteXmlBuffer, suiteResult); Utils.writeUtf8File( file.getAbsoluteFile().getParent(), file.getName(), suiteXmlBuffer.toXML()); } }