Package org.fest.swing.junit.ant
Class ReportTransformer
java.lang.Object
org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer
org.fest.swing.junit.ant.ReportTransformer
public class ReportTransformer
extends org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer
Transforms a JUnit XML report. The default transformation generates an HTML report in either framed or non-framed
style.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer
org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer.Format -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.tools.ant.types.Pathprivate static intUsed to ensure the uniqueness of a property.private static final org.apache.tools.ant.util.FileUtilsInstance of a utility class to use for file operations.private final List<org.apache.tools.ant.taskdefs.XSLTProcess.Param>The parameters that will be sent to the XSL transformation.private static final StringFields inherited from class org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer
dbfactory, document, format, FRAMES, NOFRAMES, styleDir, task, toDir -
Constructor Summary
ConstructorsConstructorDescriptionReportTransformer(org.apache.tools.ant.Task task) Creates a new.ReportTransformer -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.tools.ant.types.PathCreates the current classpath.private voidcreateNewParams(org.apache.tools.ant.taskdefs.XSLTProcess xsltTask) private voidcreateOutputDirParam(org.apache.tools.ant.taskdefs.XSLTProcess xsltTask) org.apache.tools.ant.taskdefs.XSLTProcess.ParamCreate an instance of an XSL parameter for configuration by Ant.private voidprotected org.apache.tools.ant.types.ResourceAccess the stylesheet to be used as a resource.private FileoutputFile(org.apache.tools.ant.taskdefs.TempFile tempFileTask) voidsetClasspath(org.apache.tools.ant.types.Path classpath) Sets an additional classpath.voidsetClasspathRef(org.apache.tools.ant.types.Reference r) Sets a reference to a classpath.private voidsetUpTempFileTask(org.apache.tools.ant.taskdefs.TempFile tempFileTask, String tempFileProperty) private org.apache.tools.ant.taskdefs.TempFilevoidPerforms the XSLT transformation to generate the HTML report.private org.apache.tools.ant.taskdefs.XSLTProcessxsltTask()Methods inherited from class org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer
checkOptions, configureForRedirectExtension, createFactory, getDocumentBuilderFactory, getStylesheetSystemId, setExtension, setFormat, setStyledir, setTodir, setXmlDocument, setXmlfile
-
Field Details
-
XSL_FILE_PATH
- See Also:
-
classpath
private org.apache.tools.ant.types.Path classpath -
params
The parameters that will be sent to the XSL transformation. -
FILE_UTILS
private static final org.apache.tools.ant.util.FileUtils FILE_UTILSInstance of a utility class to use for file operations. -
counter
private static int counterUsed to ensure the uniqueness of a property.
-
-
Constructor Details
-
ReportTransformer
public ReportTransformer(org.apache.tools.ant.Task task) Creates a new.ReportTransformer- Parameters:
task- task delegating to this class.
-
-
Method Details
-
createParam
public org.apache.tools.ant.taskdefs.XSLTProcess.Param createParam()Create an instance of an XSL parameter for configuration by Ant.- Overrides:
createParamin classorg.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer- Returns:
- an instance of the
Paramclass to be configured.
-
transform
public void transform() throws org.apache.tools.ant.BuildExceptionPerforms the XSLT transformation to generate the HTML report.- Overrides:
transformin classorg.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer- Throws:
org.apache.tools.ant.BuildException- thrown if something goes wrong with the transformation.
-
xsltTask
private org.apache.tools.ant.taskdefs.XSLTProcess xsltTask() -
getStylesheet
protected org.apache.tools.ant.types.Resource getStylesheet()Access the stylesheet to be used as a resource.- Overrides:
getStylesheetin classorg.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer- Returns:
- stylesheet as a resource
-
tempFileTask
private org.apache.tools.ant.taskdefs.TempFile tempFileTask() -
outputFile
-
setUpTempFileTask
private void setUpTempFileTask(org.apache.tools.ant.taskdefs.TempFile tempFileTask, String tempFileProperty) -
createNewParams
private void createNewParams(org.apache.tools.ant.taskdefs.XSLTProcess xsltTask) -
createOutputDirParam
private void createOutputDirParam(org.apache.tools.ant.taskdefs.XSLTProcess xsltTask) -
delete
-
setClasspath
public void setClasspath(org.apache.tools.ant.types.Path classpath) Sets an additional classpath.- Parameters:
classpath- the additional classpath to append to the current one.
-
setClasspathRef
public void setClasspathRef(org.apache.tools.ant.types.Reference r) Sets a reference to a classpath.- Parameters:
r- the reference to set.
-
createClasspath
public org.apache.tools.ant.types.Path createClasspath()Creates the current classpath.- Overrides:
createClasspathin classorg.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer- Returns:
- the created classpath.
-