FileDocCategorySizeDatePackage
BaseTest.javaAPI DocApache Ant 1.705097Wed Dec 13 06:16:20 GMT 2006org.apache.tools.ant.taskdefs.optional.junit

BaseTest

public abstract class BaseTest extends Object
Baseclass for BatchTest and JUnitTest.

Fields Summary
protected boolean
haltOnError
protected boolean
haltOnFail
protected boolean
filtertrace
protected boolean
fork
protected String
ifProperty
protected String
unlessProperty
protected Vector
formatters
protected File
destDir
destination directory
protected String
failureProperty
protected String
errorProperty
Constructors Summary
Methods Summary
public voidaddFormatter(FormatterElement elem)
Allow a formatter nested element.

param
elem a formatter nested element.

        formatters.addElement(elem);
    
public java.lang.StringgetErrorProperty()
Get the failure property name.

return
the name of the property to set on failure.

        return errorProperty;
    
public java.lang.StringgetFailureProperty()
Get the failure property name.

return
the name of the property to set on failure.

        return failureProperty;
    
public booleangetFiltertrace()
Get the filtertrace attribute.

return
the attribute.

        return filtertrace;
    
public booleangetFork()
Get the fork attribute.

return
the attribute.

        return fork;
    
public booleangetHaltonerror()
Get the haltonerror attribute.

return
the attribute.

        return haltOnError;
    
public booleangetHaltonfailure()
Get the haltonfailure attribute.

return
the attribute.

        return haltOnFail;
    
public java.lang.StringgetTodir()
Get the destination directory.

return
the destination directory as an absolute path if it exists otherwise return null

        if (destDir != null) {
            return destDir.getAbsolutePath();
        }
        return null;
    
public voidsetErrorProperty(java.lang.String errorProperty)
Set the name of the error property.

param
errorProperty the name of the property to set if the test has an error.

        this.errorProperty = errorProperty;
    
public voidsetFailureProperty(java.lang.String failureProperty)
Set the name of the failure property.

param
failureProperty the name of the property to set if the test fails.

        this.failureProperty = failureProperty;
    
public voidsetFiltertrace(boolean value)
Set the filtertrace attribute.

param
value a boolean value.

    // CheckStyle:VisibilityModifier ON

                  
        
        filtertrace = value;
    
public voidsetFork(boolean value)
Set the fork attribute.

param
value a boolean value.

        fork = value;
    
public voidsetHaltonerror(boolean value)
Set the haltonerror attribute.

param
value a boolean value.

        haltOnError = value;
    
public voidsetHaltonfailure(boolean value)
Set the haltonfailure attribute.

param
value a boolean value.

        haltOnFail = value;
    
public voidsetIf(java.lang.String propertyName)
Set the if attribute. If this property is present in project, the test will be run.

param
propertyName the name of the property to look for.

        ifProperty = propertyName;
    
public voidsetTodir(java.io.File destDir)
Sets the destination directory.

param
destDir the destination directory.

        this.destDir = destDir;
    
public voidsetUnless(java.lang.String propertyName)
Set the unless attribute. If this property is present in project, the test will *not* be run.

param
propertyName the name of the property to look for.

        unlessProperty = propertyName;