# PlainAntUnitListener (ant-antunit API)
declaration: package: org.apache.ant.antunit.listener, class: PlainAntUnitListener

# Klasse PlainAntUnitListener

java.lang.Object
org.apache.ant.antunit.listener.BaseAntUnitListener
org.apache.ant.antunit.listener.PlainAntUnitListener

Alle implementierten Schnittstellen:
  `AntUnitListener`

public class PlainAntUnitListener extends BaseAntUnitListener
A test listener for <antunit> modelled after the Plain JUnit test listener that is part of Ant.

## Verschachtelte Klassen - Übersicht

### Von Klasse geerbte verschachtelte Klassen/Schnittstellen BaseAntUnitListener

`BaseAntUnitListener.AntUnitLogLevel, BaseAntUnitListener.LogGrabber, BaseAntUnitListener.SendLogTo`

## Feldübersicht

### Von Klasse geerbte Felder BaseAntUnitListener

`errorCount, failureCount, nf, runCount, start, testStart`

## Konstruktorübersicht

Konstruktoren
Konstruktor
Beschreibung
`PlainAntUnitListener()`

## Methodenübersicht

Modifikator und Typ
Methode
Beschreibung
`void`
`addError(String target, Throwable ae)`
Invoked if any error other than a failed assertion occured during execution.
`void`
`addFailure(String target, AssertionFailedException ae)`
Invoked if an assert tasked caused an error during execution.
`void`
`endTest(String target)`
Invoked after a test target has been executed.
`void`
`endTestSuite(org.apache.tools.ant.Project testProject, 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(String target)`
Invoked before a test target gets executed.
`void`
`startTestSuite(org.apache.tools.ant.Project testProject, String buildFile)`
Invoked once per build file, before any targets get executed.

### Von Klasse geerbte Methoden BaseAntUnitListener

`close, getCurrentTestProject, getLocation, getOut, getToDir, normalize, setCurrentTestProject, setLogLevel, setParentTask, setToDir`

### Von Klasse geerbte Methoden Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Konstruktordetails

### PlainAntUnitListener

public PlainAntUnitListener()

## Methodendetails

### setSendLogTo

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

Setzt außer Kraft:
  `setSendLogTo` in Klasse `BaseAntUnitListener`
Parameter:
  `logTo` - where to send the test report

### startTestSuite

public void startTestSuite(org.apache.tools.ant.Project testProject, String buildFile)
Beschreibung aus Schnittstelle kopiert: `AntUnitListener`
Invoked once per build file, before any targets get executed.

Angegeben von:
  `startTestSuite` in Schnittstelle `AntUnitListener`
Setzt außer Kraft:
  `startTestSuite` in Klasse `BaseAntUnitListener`
Parameter:
  `testProject` - the project
  `buildFile` - the build file

### endTestSuite

public void endTestSuite(org.apache.tools.ant.Project testProject, String buildFile)
Beschreibung aus Schnittstelle kopiert: `AntUnitListener`
Invoked once per build file, after all targets have been executed.

Parameter:
  `testProject` - the project
  `buildFile` - the build file

### startTest

public void startTest(String target)
Beschreibung aus Schnittstelle kopiert: `AntUnitListener`
Invoked before a test target gets executed.

Angegeben von:
  `startTest` in Schnittstelle `AntUnitListener`
Setzt außer Kraft:
  `startTest` in Klasse `BaseAntUnitListener`
Parameter:
  `target` - name of the target

### endTest

public void endTest(String target)
Beschreibung aus Schnittstelle kopiert: `AntUnitListener`
Invoked after a test target has been executed.

Parameter:
  `target` - name of the target

### addFailure

public void addFailure(String target, AssertionFailedException ae)
Beschreibung aus Schnittstelle kopiert: `AntUnitListener`
Invoked if an assert tasked caused an error during execution.

Angegeben von:
  `addFailure` in Schnittstelle `AntUnitListener`
Setzt außer Kraft:
  `addFailure` in Klasse `BaseAntUnitListener`
Parameter:
  `target` - name of the target
  `ae` - the failure

### addError

public void addError(String target, Throwable ae)
Beschreibung aus Schnittstelle kopiert: `AntUnitListener`
Invoked if any error other than a failed assertion occured during execution.

Angegeben von:
  `addError` in Schnittstelle `AntUnitListener`
Setzt außer Kraft:
  `addError` in Klasse `BaseAntUnitListener`
Parameter:
  `target` - name of the target
  `ae` - the error

### messageLogged

protected void messageLogged(org.apache.tools.ant.BuildEvent event)
Beschreibung aus Klasse kopiert: `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.

Setzt außer Kraft:
  `messageLogged` in Klasse `BaseAntUnitListener`
Parameter:
  `event` - the logged message