Class EUnitTask

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
All Implemented Interfaces:
Cloneable, EUnitTestListener

public class EUnitTask extends ExecutableModuleTask implements EUnitTestListener
Ant task for running EUnit test suites.
Version:
1.0
Author:
Antonio Garcia-Dominguez
  • Constructor Details

    • EUnitTask

      public EUnitTask()
  • Method Details

    • initialize

      protected void initialize() throws Exception
      Specified by:
      initialize in class ExecutableModuleTask
      Throws:
      Exception
    • examine

      protected void examine() throws Exception
      Specified by:
      examine in class ExecutableModuleTask
      Throws:
      Exception
    • createDefaultModule

      public IEolModule createDefaultModule()
      Specified by:
      createDefaultModule in class ExecutableModuleTask
    • beforeCase

      public void beforeCase(EUnitModule module, EUnitTest test)
      Description copied from interface: EUnitTestListener
      Notification sent before running a test case.
      Specified by:
      beforeCase in interface EUnitTestListener
      Parameters:
      module - EUnit module under execution.
      test - Description of the test case: its result has not been set yet.
    • afterCase

      public void afterCase(EUnitModule module, EUnitTest test)
      Description copied from interface: EUnitTestListener
      Notification sent after running a test case.
      Specified by:
      afterCase in interface EUnitTestListener
      Parameters:
      module - EUnit module under execution.
      test - Test case, with its result set.
    • saveModelDeltas

      protected void saveModelDeltas(EUnitModule module, EUnitTest test, PrintStream err, Throwable testException)
    • createModelTasks

      public EUnitTask.TaskCollection createModelTasks()
    • createComparators

      public EUnitTask.ComparatorReferenceList createComparators()
    • getToDir

      public File getToDir()
      Returns the destination directory for the JUnit-like report. By default, it is the base directory of the Ant project.
    • setToDir

      public void setToDir(File f)
      Changes the destination directory for the JUnit-like report. See getToDir() for the default value.
    • getPackage

      public String getPackage()
      Returns the package in which all tests will be contained. By default, it is set to EUnitModule.DEFAULT_PACKAGE.
    • setPackage

      public void setPackage(String packageName)
      Changes the package in which all tests will be contained. Empty or null arguments are ignored.
    • isReport

      public boolean isReport()
      Returns true if a XML report compatible with the <junit> Ant task should be generated.
    • setReport

      public void setReport(boolean generate)
      Changes whether an XML report compatible with the <junit> Ant task should be generated. By default, it will be generated.
      Parameters:
      generate - If true, the XML report will be generated. Otherwise, it will not be generated.
    • isSaveModelDeltas

      public boolean isSaveModelDeltas()
      Returns true if any detected model differences will be saved to a file, named after the test suite package, test suite class, and test name. The extension will depend on the comparator being used.
    • setSaveModelDeltas

      public void setSaveModelDeltas(boolean save)
      Changes whether model differences will be saved to a file (when set to true) or not (when set to false).