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

# Klasse LogForwarder

java.lang.Object
org.apache.ant.antunit.listener.LogForwarder

Alle implementierten Schnittstellen:
  `AntUnitListener`

public class LogForwarder extends Object implements AntUnitListener
A test listener for <antunit> who's whole purpose is to forward log output from the project under test to the project executing the <antunit> task.

## Konstruktorübersicht

Konstruktoren
Konstruktor
Beschreibung
`LogForwarder()`

## 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.
`void`
`setCurrentTestProject(org.apache.tools.ant.Project p)`
Set a reference to the Project instance currently executing the test target.
`void`
`setParentTask(org.apache.tools.ant.Task t)`
Set a reference to the AntUnit task executing the tests, this provides access to the containing project, target or Ant's logging system.
`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 Object

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

## Konstruktordetails

### LogForwarder

public LogForwarder()

## Methodendetails

### setParentTask

public void setParentTask(org.apache.tools.ant.Task t)
Beschreibung aus Schnittstelle kopiert: `AntUnitListener`
Set a reference to the AntUnit task executing the tests, this provides access to the containing project, target or Ant's logging system.

Angegeben von:
  `setParentTask` in Schnittstelle `AntUnitListener`
Parameter:
  `t` - the parent task

### setCurrentTestProject

public void setCurrentTestProject(org.apache.tools.ant.Project p)
Beschreibung aus Schnittstelle kopiert: `AntUnitListener`
Set a reference to the Project instance currently executing the test target.

This provides access to the logging system or the properties of the project under test. Note that different test targets will be executed in different Ant Project instances.

Angegeben von:
  `setCurrentTestProject` in Schnittstelle `AntUnitListener`
Parameter:
  `p` - the test project

### 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`
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.

Angegeben von:
  `endTestSuite` in Schnittstelle `AntUnitListener`
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`
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.

Angegeben von:
  `endTest` in Schnittstelle `AntUnitListener`
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`
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`
Parameter:
  `target` - name of the target
  `ae` - the error