Methods Summary |
---|
void | addFormattersTo(java.util.Vector v)Convenient method to add formatters to a vector
final int count = formatters.size();
for (int i = 0; i < count; i++) {
v.addElement(formatters.elementAt(i));
}
|
public java.lang.Object | clone()
try {
JUnitTest t = (JUnitTest) super.clone();
t.props = props == null ? null : (Properties) props.clone();
t.formatters = (Vector) formatters.clone();
return t;
} catch (CloneNotSupportedException e) {
// plain impossible
return this;
}
|
public long | errorCount()Get the number of errors.
return errors;
|
public long | failureCount()Get the number of failures.
return failures;
|
public FormatterElement[] | getFormatters()Get the formatters set for this test.
FormatterElement[] fes = new FormatterElement[formatters.size()];
formatters.copyInto(fes);
return fes;
|
public java.lang.String | getName()Get the name of the test class.
return name;
|
public java.lang.String | getOutfile()Get the name of the output file
return outfile;
|
public java.util.Properties | getProperties()Get the properties used in the test.
return props;
|
public long | getRunTime()Get the run time.
return runTime;
|
public long | runCount()Get the number of runs.
return runs;
|
public void | setCounts(long runs, long failures, long errors)Set the number of runs, failures and errors.
this.runs = runs;
this.failures = failures;
this.errors = errors;
|
public void | setName(java.lang.String value)Set the name of the test class.
name = value;
|
public void | setOutfile(java.lang.String value)Set the name of the output file.
outfile = value;
|
public void | setProperties(java.util.Hashtable p)Set the properties to be used in the test.
props = new Properties();
for (Enumeration e = p.keys(); e.hasMoreElements();) {
Object key = e.nextElement();
props.put(key, p.get(key));
}
|
public void | setRunTime(long runTime)Set the runtime.
this.runTime = runTime;
|
public boolean | shouldRun(org.apache.tools.ant.Project p)Check if this test should run based on the if and unless
attributes.
if (ifProperty != null && p.getProperty(ifProperty) == null) {
return false;
} else if (unlessProperty != null
&& p.getProperty(unlessProperty) != null) {
return false;
}
return true;
|