org.apache.tools.ant.taskdefs.optional.junit

Class JUnitTest

Implemented Interfaces:
Cloneable

public class JUnitTest
extends BaseTest
implements Cloneable

Run a single JUnit test.

The JUnit test is actually run by JUnitTestRunner. So read the doc comments for that class :)

Since:
Ant 1.2
See Also:
JUnitTask, JUnitTestRunner

Field Summary

Fields inherited from class org.apache.tools.ant.taskdefs.optional.junit.BaseTest

destDir, errorProperty, failureProperty, filtertrace, fork, formatters, haltOnError, haltOnFail, ifProperty, unlessProperty

Constructor Summary

JUnitTest()
JUnitTest(String name)
JUnitTest(String name, boolean haltOnError, boolean haltOnFailure, boolean filtertrace)

Method Summary

Object
clone()
long
errorCount()
long
failureCount()
FormatterElement[]
getFormatters()
String
getName()
Get the name of the test class.
String
getOutfile()
Get the name of the output file
Properties
getProperties()
long
getRunTime()
long
runCount()
void
setCounts(long runs, long failures, long errors)
void
setName(String value)
Set the name of the test class.
void
setOutfile(String value)
Set the name of the output file.
void
setProperties(Hashtable p)
void
setRunTime(long runTime)
boolean
shouldRun(Project p)

Methods inherited from class org.apache.tools.ant.taskdefs.optional.junit.BaseTest

addFormatter, getErrorProperty, getFailureProperty, getFiltertrace, getFork, getHaltonerror, getHaltonfailure, getTodir, setErrorProperty, setFailureProperty, setFiltertrace, setFork, setHaltonerror, setHaltonfailure, setIf, setTodir, setUnless

Constructor Details

JUnitTest

public JUnitTest()

JUnitTest

public JUnitTest(String name)

JUnitTest

public JUnitTest(String name,
                 boolean haltOnError,
                 boolean haltOnFailure,
                 boolean filtertrace)

Method Details

clone

public Object clone()
Since:
Ant 1.5

errorCount

public long errorCount()

failureCount

public long failureCount()

getFormatters

public FormatterElement[] getFormatters()

getName

public String getName()
Get the name of the test class.

getOutfile

public String getOutfile()
Get the name of the output file
Returns:
the name of the output file.

getProperties

public Properties getProperties()

getRunTime

public long getRunTime()

runCount

public long runCount()

setCounts

public void setCounts(long runs,
                      long failures,
                      long errors)

setName

public void setName(String value)
Set the name of the test class.

setOutfile

public void setOutfile(String value)
Set the name of the output file.

setProperties

public void setProperties(Hashtable p)

setRunTime

public void setRunTime(long runTime)

shouldRun

public boolean shouldRun(Project p)

Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.