org.codehaus.groovy.grails.test.report.junit
Class PlainFormatter

java.lang.Object
  extended by org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter
      extended by org.codehaus.groovy.grails.test.report.junit.PlainFormatter
All Implemented Interfaces:
junit.framework.TestListener, org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter, org.apache.tools.ant.taskdefs.optional.junit.JUnitTaskMirror.JUnitResultFormatterMirror

public class PlainFormatter
extends org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter

JUnit plain text formatter that sanitises the stack traces generated by tests.


Field Summary
protected  File file
           
protected  String name
           
protected  String systemError
           
protected  String systemOutput
           
 
Constructor Summary
PlainFormatter(String name, File file)
           
 
Method Summary
 void addError(junit.framework.Test test, Throwable throwable)
           
 void addFailure(junit.framework.Test test, Throwable throwable)
           
 void endTestSuite(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest suite)
           
 void setOutput(OutputStream out)
           
 void setSystemError(String out)
           
 void setSystemOutput(String out)
           
protected  void writeToFile(File file, String text)
           
 
Methods inherited from class org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter
addFailure, endTest, startTest, startTestSuite
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name

file

protected File file

systemOutput

protected String systemOutput

systemError

protected String systemError
Constructor Detail

PlainFormatter

public PlainFormatter(String name,
                      File file)
Method Detail

setOutput

public void setOutput(OutputStream out)
Specified by:
setOutput in interface org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter
Specified by:
setOutput in interface org.apache.tools.ant.taskdefs.optional.junit.JUnitTaskMirror.JUnitResultFormatterMirror
Overrides:
setOutput in class org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter

setSystemError

public void setSystemError(String out)
Specified by:
setSystemError in interface org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter
Overrides:
setSystemError in class org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter

setSystemOutput

public void setSystemOutput(String out)
Specified by:
setSystemOutput in interface org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter
Overrides:
setSystemOutput in class org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter

addFailure

public void addFailure(junit.framework.Test test,
                       Throwable throwable)
Overrides:
addFailure in class org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter

addError

public void addError(junit.framework.Test test,
                     Throwable throwable)
Specified by:
addError in interface junit.framework.TestListener
Overrides:
addError in class org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter

endTestSuite

public void endTestSuite(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest suite)
Specified by:
endTestSuite in interface org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter
Overrides:
endTestSuite in class org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter

writeToFile

protected void writeToFile(File file,
                           String text)


Copyright (c) 2005-2009 The Grails project