com.hjl.junitscript.ant
Class JUnitTest

java.lang.Object
  |
  +--com.hjl.junitscript.ant.BaseTest
        |
        +--com.hjl.junitscript.ant.JUnitTest
All Implemented Interfaces:
java.lang.Cloneable

public class JUnitTest
extends BaseTest
implements java.lang.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
Author:
Thomas Haas, Stefan Bodewig,, Stephane Bailliez
See Also:
JUnitTask, JUnitTestRunner

Field Summary
 
Fields inherited from class com.hjl.junitscript.ant.BaseTest
args, destDir, errorProperty, failureProperty, filtertrace, fork, formatters, haltOnError, haltOnFail, ifProperty, unlessProperty, useArgs
 
Constructor Summary
JUnitTest()
           
JUnitTest(java.lang.String className)
           
 
Method Summary
 java.lang.Object clone()
           
 long errorCount()
           
 long failureCount()
           
 java.lang.String getClassName()
          Get the name of the test class.
 com.hjl.junitscript.ant.FormatterElement[] getFormatters()
           
 java.lang.String getName()
          Get the name of the test.
 java.lang.String getNameAsFile()
          Get the name of the test.
 java.lang.String getOutfile()
          Get the name of the output file
 java.util.Properties getProperties()
           
 long getRunTime()
           
 boolean getUseArgs()
           
 long runCount()
           
 void setClassName(java.lang.String value)
          Set the class name of the test class.
 void setCounts(long runs, long failures, long errors)
           
 void setOutfile(java.lang.String value)
          Set the name of the output file.
 void setProperties(java.util.Hashtable p)
           
 void setRunTime(long runTime)
           
 void setScript(java.io.File value)
          Set the script name of the test class.
 boolean shouldRun(org.apache.tools.ant.Project p)
           
 
Methods inherited from class com.hjl.junitscript.ant.BaseTest
addFormatter, createArg, getArguments, getErrorProperty, getFailureProperty, getFiltertrace, getFork, getHaltonerror, getHaltonfailure, getTodir, setArguments, setErrorProperty, setFailureProperty, setFiltertrace, setFork, setHaltonerror, setHaltonfailure, setIf, setTodir, setUnless, setUseArgs
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JUnitTest

public JUnitTest()

JUnitTest

public JUnitTest(java.lang.String className)
Method Detail

setClassName

public void setClassName(java.lang.String value)
Set the class name of the test class.


setScript

public void setScript(java.io.File value)
Set the script name of the test class.


setOutfile

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


getName

public java.lang.String getName()
Get the name of the test.


getNameAsFile

public java.lang.String getNameAsFile()
Get the name of the test.


getClassName

public java.lang.String getClassName()
Get the name of the test class.


getUseArgs

public boolean getUseArgs()

getOutfile

public java.lang.String getOutfile()
Get the name of the output file

Returns:
the name of the output file.

setCounts

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

setRunTime

public void setRunTime(long runTime)

runCount

public long runCount()

failureCount

public long failureCount()

errorCount

public long errorCount()

getRunTime

public long getRunTime()

getProperties

public java.util.Properties getProperties()

setProperties

public void setProperties(java.util.Hashtable p)

shouldRun

public boolean shouldRun(org.apache.tools.ant.Project p)

getFormatters

public com.hjl.junitscript.ant.FormatterElement[] getFormatters()

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object
Since:
Ant 1.5