BaseTest (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.taskdefs.optional.junit, class: BaseTest

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

# Class BaseTest

java.lang.Object
org.apache.tools.ant.taskdefs.optional.junit.BaseTest

Direct Known Subclasses:
  `BatchTest`, `JUnitTest`

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

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected File`
  `destDir`
  destination directory
  `protected String`
  `errorProperty`
  `protected String`
  `failureProperty`
  `protected boolean`
  `filtertrace`
  `protected boolean`
  `fork`
  `protected Vector<FormatterElement>`
  `formatters`
  `protected boolean`
  `haltOnError`
  `protected boolean`
  `haltOnFail`
  `protected String`
  `ifProperty`
  `protected String`
  `unlessProperty`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BaseTest()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addFormatter(FormatterElement elem)`
  Allow a formatter nested element.
  `String`
  `getErrorProperty()`
  Get the failure property name.
  `String`
  `getFailureProperty()`
  Get the failure property name.
  `boolean`
  `getFiltertrace()`
  Get the filtertrace attribute.
  `boolean`
  `getFork()`
  Get the fork attribute.
  `boolean`
  `getHaltonerror()`
  Get the haltonerror attribute.
  `boolean`
  `getHaltonfailure()`
  Get the haltonfailure attribute.
  `Object`
  `getIfCondition()`
  The if expression
  `String`
  `getTodir()`
  Get the destination directory.
  `Object`
  `getUnlessCondition()`
  The unless expression
  `boolean`
  `isSkipNonTests()`
  `void`
  `setErrorProperty(String errorProperty)`
  Set the name of the error property.
  `void`
  `setFailureProperty(String failureProperty)`
  Set the name of the failure property.
  `void`
  `setFiltertrace(boolean value)`
  Set the filtertrace attribute.
  `void`
  `setFork(boolean value)`
  Set the fork attribute.
  `void`
  `setHaltonerror(boolean value)`
  Set the haltonerror attribute.
  `void`
  `setHaltonfailure(boolean value)`
  Set the haltonfailure attribute.
  `void`
  `setIf(Object ifCondition)`
  Set the if attribute.
  `void`
  `setIf(String propertyName)`
  Set the if attribute.
  `void`
  `setSkipNonTests(boolean skipNonTests)`
  `void`
  `setTodir(File destDir)`
  Sets the destination directory.
  `void`
  `setUnless(Object unlessCondition)`
  Set the unless attribute.
  `void`
  `setUnless(String propertyName)`
  Set the unless attribute.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### haltOnError

    protected boolean haltOnError

  - ### haltOnFail

    protected boolean haltOnFail

  - ### filtertrace

    protected boolean filtertrace

  - ### fork

    protected boolean fork

  - ### ifProperty

    protected String ifProperty

  - ### unlessProperty

    protected String unlessProperty

  - ### formatters

    protected Vector<FormatterElement> formatters

  - ### destDir

    protected File destDir
    destination directory

  - ### failureProperty

    protected String failureProperty

  - ### errorProperty

    protected String errorProperty

- ## Constructor Details

  - ### BaseTest

    public BaseTest()

- ## Method Details

  - ### setFiltertrace

    public void setFiltertrace(boolean value)
    Set the filtertrace attribute.
    Parameters:
      `value` - a `boolean` value.

  - ### getFiltertrace

    public boolean getFiltertrace()
    Get the filtertrace attribute.
    Returns:
      the attribute.

  - ### setFork

    public void setFork(boolean value)
    Set the fork attribute.
    Parameters:
      `value` - a `boolean` value.

  - ### getFork

    public boolean getFork()
    Get the fork attribute.
    Returns:
      the attribute.

  - ### setHaltonerror

    public void setHaltonerror(boolean value)
    Set the haltonerror attribute.
    Parameters:
      `value` - a `boolean` value.

  - ### setHaltonfailure

    public void setHaltonfailure(boolean value)
    Set the haltonfailure attribute.
    Parameters:
      `value` - a `boolean` value.

  - ### getHaltonerror

    public boolean getHaltonerror()
    Get the haltonerror attribute.
    Returns:
      the attribute.

  - ### getHaltonfailure

    public boolean getHaltonfailure()
    Get the haltonfailure attribute.
    Returns:
      the attribute.

  - ### setIf

    public void setIf(Object ifCondition)
    Set the if attribute. If this expression evaluates to true or the name of a property which is present in project, the test will be run.
    Parameters:
      `ifCondition` - the expression to evaluate
    Since:
      Ant 1.8.0

  - ### setIf

    public void setIf(String propertyName)
    Set the if attribute. If this expression evaluates to true or the name of a property which is present in project, the test will be run.
    Parameters:
      `propertyName` - the expression to evaluate

  - ### getIfCondition

    public Object getIfCondition()
    The if expression
    Returns:
      Object
    Since:
      Ant 1.8.0

  - ### setUnless

    public void setUnless(Object unlessCondition)
    Set the unless attribute. If this expression evaluates to false or the name of a property which is not present in project, the test will be run.
    Parameters:
      `unlessCondition` - the expression to evaluate
    Since:
      Ant 1.8.0

  - ### setUnless

    public void setUnless(String propertyName)
    Set the unless attribute. If this expression evaluates to false or the name of a property which is not present in project, the test will be run.
    Parameters:
      `propertyName` - the expression to evaluate

  - ### getUnlessCondition

    public Object getUnlessCondition()
    The unless expression
    Returns:
      Object
    Since:
      Ant 1.8.0

  - ### addFormatter

    public void addFormatter(FormatterElement elem)
    Allow a formatter nested element.
    Parameters:
      `elem` - a formatter nested element.

  - ### setTodir

    public void setTodir(File destDir)
    Sets the destination directory.
    Parameters:
      `destDir` - the destination directory.

  - ### getTodir

    public String getTodir()
    Get the destination directory.
    Returns:
      the destination directory as an absolute path if it exists otherwise return `null`

  - ### getFailureProperty

    public String getFailureProperty()
    Get the failure property name.
    Returns:
      the name of the property to set on failure.

  - ### setFailureProperty

    public void setFailureProperty(String failureProperty)
    Set the name of the failure property.
    Parameters:
      `failureProperty` - the name of the property to set if the test fails.

  - ### getErrorProperty

    public String getErrorProperty()
    Get the failure property name.
    Returns:
      the name of the property to set on failure.

  - ### setErrorProperty

    public void setErrorProperty(String errorProperty)
    Set the name of the error property.
    Parameters:
      `errorProperty` - the name of the property to set if the test has an error.

  - ### setSkipNonTests

    public void setSkipNonTests(boolean skipNonTests)

  - ### isSkipNonTests

    public boolean isSkipNonTests()