org.apache.ant.antunit.listener
Class PlainAntUnitListener

java.lang.Object
  extended by org.apache.ant.antunit.listener.BaseAntUnitListener
      extended by org.apache.ant.antunit.listener.PlainAntUnitListener
All Implemented Interfaces:
AntUnitListener

public class PlainAntUnitListener
extends BaseAntUnitListener

A test listener for <antunit> modelled after the Plain JUnit test listener that is part of Ant.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.ant.antunit.listener.BaseAntUnitListener
BaseAntUnitListener.AntUnitLogLevel, BaseAntUnitListener.LogGrabber, BaseAntUnitListener.SendLogTo
 
Field Summary
 
Fields inherited from class org.apache.ant.antunit.listener.BaseAntUnitListener
errorCount, failureCount, nf, runCount, start, testStart
 
Constructor Summary
PlainAntUnitListener()
           
 
Method Summary
 void addError(java.lang.String target, java.lang.Throwable ae)
          Invoked if any error other than a failed assertion occured during execution.
 void addFailure(java.lang.String target, AssertionFailedException ae)
          Invoked if an assert tasked caused an error during execution.
 void endTest(java.lang.String target)
          Invoked after a test target has been executed.
 void endTestSuite(org.apache.tools.ant.Project testProject, java.lang.String buildFile)
          Invoked once per build file, after all targets have been executed.
protected  void messageLogged(org.apache.tools.ant.BuildEvent event)
          Gets messages from the project running the test target if their level is at least of the level specified with setLogLevel.
 void setSendLogTo(BaseAntUnitListener.SendLogTo logTo)
          Where to send the test report.
 void startTest(java.lang.String target)
          Invoked before a test target gets executed.
 void startTestSuite(org.apache.tools.ant.Project testProject, java.lang.String buildFile)
          Invoked once per build file, before any targets get executed.
 
Methods inherited from class org.apache.ant.antunit.listener.BaseAntUnitListener
close, getCurrentTestProject, getLocation, getOut, getToDir, normalize, setCurrentTestProject, setLogLevel, setParentTask, setToDir
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlainAntUnitListener

public PlainAntUnitListener()
Method Detail

setSendLogTo

public void setSendLogTo(BaseAntUnitListener.SendLogTo logTo)
Where to send the test report.

Overrides:
setSendLogTo in class BaseAntUnitListener

startTestSuite

public void startTestSuite(org.apache.tools.ant.Project testProject,
                           java.lang.String buildFile)
Description copied from interface: AntUnitListener
Invoked once per build file, before any targets get executed.

Specified by:
startTestSuite in interface AntUnitListener
Overrides:
startTestSuite in class BaseAntUnitListener

endTestSuite

public void endTestSuite(org.apache.tools.ant.Project testProject,
                         java.lang.String buildFile)
Description copied from interface: AntUnitListener
Invoked once per build file, after all targets have been executed.


startTest

public void startTest(java.lang.String target)
Description copied from interface: AntUnitListener
Invoked before a test target gets executed.

Specified by:
startTest in interface AntUnitListener
Overrides:
startTest in class BaseAntUnitListener

endTest

public void endTest(java.lang.String target)
Description copied from interface: AntUnitListener
Invoked after a test target has been executed.


addFailure

public void addFailure(java.lang.String target,
                       AssertionFailedException ae)
Description copied from interface: AntUnitListener
Invoked if an assert tasked caused an error during execution.

Specified by:
addFailure in interface AntUnitListener
Overrides:
addFailure in class BaseAntUnitListener

addError

public void addError(java.lang.String target,
                     java.lang.Throwable ae)
Description copied from interface: AntUnitListener
Invoked if any error other than a failed assertion occured during execution.

Specified by:
addError in interface AntUnitListener
Overrides:
addError in class BaseAntUnitListener

messageLogged

protected void messageLogged(org.apache.tools.ant.BuildEvent event)
Description copied from class: BaseAntUnitListener
Gets messages from the project running the test target if their level is at least of the level specified with setLogLevel.

This implementation is empty.

Overrides:
messageLogged in class BaseAntUnitListener


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.