org.quilt.framework
Class QuiltTest

java.lang.Object
  |
  +--org.quilt.framework.QuiltTest
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
BatchTest, MockTestRunner, Runner

public class QuiltTest
extends java.lang.Object
implements java.lang.Cloneable

Parameters for controlling an individual task. These are and must be compatible with names used in Ant build.xml build control files. Most are set by methods whose name is derived from the variable name -- for example fork is set by setFork(b).


Constructor Summary
QuiltTest()
          No-arg constructor used by clone()
QuiltTest(java.lang.String name)
          Single-arg constructor.
 
Method Summary
 void addFormatter(FmtSelector elem)
           
 void addFormattersTo(java.util.Vector v)
          Add this test's formatters to a vector.
 java.lang.Object clone()
          Clones, resetting the error/failure/run counts and runTime to zero.
 long errorCount()
           
 long failureCount()
           
 boolean getCheckCoverage()
           
 java.lang.String getCheckExcludes()
           
 java.lang.String[] getCheckExcludesArray()
           
 java.lang.String getCheckIncludes()
           
 java.lang.String[] getCheckIncludesArray()
           
 java.lang.String getErrorProperty()
           
 java.lang.String getFailureProperty()
           
 boolean getFiltertrace()
           
 boolean getFork()
           
 java.util.Vector getFormatters()
           
 boolean getHaltOnError()
           
 boolean getHaltOnFailure()
           
 java.lang.String getIfProperty()
           
 boolean getMockTestRun()
           
 java.lang.String getName()
           
 java.lang.String getOutfile()
           
 java.util.Properties getProperties()
           
 long getRunTime()
           
 boolean getShowOutput()
           
 java.lang.String getTodir()
           
 java.lang.String getUnlessProperty()
           
 long runCount()
           
 boolean runMe(org.apache.tools.ant.Project p)
          Run this test if project properties permit.
 void setCheckCoverage(boolean b)
           
 void setCheckExcludes(java.lang.String val)
           
 void setCheckIncludes(java.lang.String val)
           
 void setCounts(long runs, long failures, long errors)
           
 void setErrorProperty(java.lang.String eP)
           
 void setFailureProperty(java.lang.String fP)
           
 void setFiltertrace(boolean b)
           
 void setFork(boolean b)
           
 void setHaltOnError(boolean b)
           
 void setHaltOnFailure(boolean b)
           
 void setIf(java.lang.String name)
           
 void setMockTestRun(boolean b)
           
 void setName(java.lang.String val)
           
 void setOutfile(java.lang.String val)
           
 void setProperties(java.util.Hashtable val)
          Replace the test's Properties.
 void setRunTime(long val)
           
 void setShowOutput(boolean b)
           
 void setTodir(java.io.File dir)
           
 void setUnless(java.lang.String name)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QuiltTest

public QuiltTest()
No-arg constructor used by clone()


QuiltTest

public QuiltTest(java.lang.String name)
Single-arg constructor.

Parameters:
name - Full class name of test to be run.
Method Detail

setCounts

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

errorCount

public long errorCount()

failureCount

public long failureCount()

runCount

public long runCount()

getProperties

public java.util.Properties getProperties()
Returns:
A reference to the test's Properties

setProperties

public void setProperties(java.util.Hashtable val)
Replace the test's Properties. This is quite different from the method in JUnitTask, which seems to contain errors.

Parameters:
val - Hashtable containing new values.

getRunTime

public long getRunTime()

setRunTime

public void setRunTime(long val)

addFormattersTo

public void addFormattersTo(java.util.Vector v)
Add this test's formatters to a vector. A convenience method with a mildly confusing name. Inherited from JUnitTask.


getCheckCoverage

public boolean getCheckCoverage()

setCheckCoverage

public void setCheckCoverage(boolean b)

getCheckExcludes

public java.lang.String getCheckExcludes()

getCheckExcludesArray

public java.lang.String[] getCheckExcludesArray()

setCheckExcludes

public void setCheckExcludes(java.lang.String val)

getCheckIncludes

public java.lang.String getCheckIncludes()

getCheckIncludesArray

public java.lang.String[] getCheckIncludesArray()

setCheckIncludes

public void setCheckIncludes(java.lang.String val)

getErrorProperty

public java.lang.String getErrorProperty()

setErrorProperty

public void setErrorProperty(java.lang.String eP)

getFailureProperty

public java.lang.String getFailureProperty()

setFailureProperty

public void setFailureProperty(java.lang.String fP)

getFiltertrace

public boolean getFiltertrace()

setFiltertrace

public void setFiltertrace(boolean b)

getFork

public boolean getFork()

setFork

public void setFork(boolean b)

addFormatter

public void addFormatter(FmtSelector elem)

getFormatters

public java.util.Vector getFormatters()

getHaltOnError

public boolean getHaltOnError()

setHaltOnError

public void setHaltOnError(boolean b)

getHaltOnFailure

public boolean getHaltOnFailure()

setHaltOnFailure

public void setHaltOnFailure(boolean b)

getIfProperty

public java.lang.String getIfProperty()

setIf

public void setIf(java.lang.String name)

getMockTestRun

public boolean getMockTestRun()

setMockTestRun

public void setMockTestRun(boolean b)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String val)

getOutfile

public java.lang.String getOutfile()

setOutfile

public void setOutfile(java.lang.String val)

getShowOutput

public boolean getShowOutput()

setShowOutput

public void setShowOutput(boolean b)

getTodir

public java.lang.String getTodir()

setTodir

public void setTodir(java.io.File dir)

getUnlessProperty

public java.lang.String getUnlessProperty()

setUnless

public void setUnless(java.lang.String name)

clone

public java.lang.Object clone()
Clones, resetting the error/failure/run counts and runTime to zero.

Overrides:
clone in class java.lang.Object
Returns:
An Object, a copy of this QuiltTest.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

runMe

public boolean runMe(org.apache.tools.ant.Project p)
Run this test if project properties permit.

Parameters:
p - The project that the QuiltTask is part of.
Returns:
True if this test should be run, false otherwise.


Copyright © 2001-2003 Apache Software Foundation. All Rights Reserved.