junitour
Class UnitourResultFormatter

java.lang.Object
  extended by junitour.UnitourResultFormatter
All Implemented Interfaces:
junit.framework.TestListener, org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter

public class UnitourResultFormatter
extends java.lang.Object
implements org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter

Description: Ant - JunitResult Formatter, based on XMLJUnitResultFormatter from ant-optional tasks 1.5.3

$Log$ Revision 1.5 2005/07/31 03:16:04 hostlows using Java 5 generics for making code simpler: less casts, simpler for-loops Revision 1.4 2004/12/04 22:09:43 hostlows direct referencing instead of inheritance of interface XMLConstants, just for it's constants Revision 1.3 2004/12/04 22:00:22 hostlows javadoc enhancements: more comments, more details

Version:
$Revision: 53 $
Author:
$Author: hostlows $
See Also:
XMLJUnitResultFormatter

Constructor Summary
UnitourResultFormatter()
           
 
Method Summary
 void addError(junit.framework.Test test, java.lang.Throwable t)
          implementing interface TestListener Will be called, when an error occured while running any test
 void addFailure(junit.framework.Test test, junit.framework.AssertionFailedError t)
          implementing interface TestListener for JUnit > 3.4.
 void addFailure(junit.framework.Test test, java.lang.Throwable t)
          implementing interface TestListener Will be called, when the test failed
 void endTest(junit.framework.Test test)
          Interface TestListener.
 void endTestSuite(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest suite)
          The whole testsuite ended.
 java.lang.String filterStack(java.lang.String stack)
          Filters stack traces: removes internal JUnit and Maven classes
Just a copy of JUnitTestRunner.filterStack(String), but modified, to use filterLineByJunitour(java.lang.String)
 void setOutput(java.io.OutputStream out)
           
 void setSystemError(java.lang.String out)
           
 void setSystemOutput(java.lang.String out)
           
 void startTest(junit.framework.Test t)
          Interface TestListener.
 void startTestSuite(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest suite)
          The whole testsuite started.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnitourResultFormatter

public UnitourResultFormatter()
Method Detail

setOutput

public void setOutput(java.io.OutputStream out)
Specified by:
setOutput in interface org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter

setSystemOutput

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

setSystemError

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

startTestSuite

public void startTestSuite(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest suite)
The whole testsuite started.

Specified by:
startTestSuite in interface org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter

endTestSuite

public void endTestSuite(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest suite)
                  throws org.apache.tools.ant.BuildException
The whole testsuite ended.

Specified by:
endTestSuite in interface org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter
Throws:
org.apache.tools.ant.BuildException

startTest

public void startTest(junit.framework.Test t)
Interface TestListener.

A new Test is started.

Specified by:
startTest in interface junit.framework.TestListener

endTest

public void endTest(junit.framework.Test test)
Interface TestListener.

A Test is finished.

Specified by:
endTest in interface junit.framework.TestListener

addFailure

public void addFailure(junit.framework.Test test,
                       java.lang.Throwable t)
implementing interface TestListener

Will be called, when the test failed


addFailure

public void addFailure(junit.framework.Test test,
                       junit.framework.AssertionFailedError t)
implementing interface TestListener for JUnit > 3.4.

Will be called, when the test failed

Specified by:
addFailure in interface junit.framework.TestListener

addError

public void addError(junit.framework.Test test,
                     java.lang.Throwable t)
implementing interface TestListener

Will be called, when an error occured while running any test

Specified by:
addError in interface junit.framework.TestListener

filterStack

public java.lang.String filterStack(java.lang.String stack)
Filters stack traces: removes internal JUnit and Maven classes
Just a copy of JUnitTestRunner.filterStack(String), but modified, to use filterLineByJunitour(java.lang.String)



Copyright © 2005-2007. All Rights Reserved.