Klasse AntUnitSuite

java.lang.Object
junit.framework.TestSuite
org.apache.ant.antunit.junit3.AntUnitSuite
Alle implementierten Schnittstellen:
junit.framework.Test

public class AntUnitSuite extends junit.framework.TestSuite
A JUnit 3 TestSuite that group a suite of AntUnit targets coming from an ant script.
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    AntUnitSuite(File scriptFile, Class<?> rootClass)
    Create a JUnit TestSuite that when executed will run the given ant script.
  • Methodenübersicht

    Modifikator und Typ
    Methode
    Beschreibung
    org.apache.tools.ant.BuildException
     
    boolean
     
    void
    run(junit.framework.TestResult testResult)
    void
    Execute the test suite in a 'container' similar to the ant 'container'.
    void
    runTest(junit.framework.Test test, junit.framework.TestResult result)

    Von Klasse geerbte Methoden junit.framework.TestSuite

    addTest, addTestSuite, countTestCases, createTest, getName, getTestConstructor, setName, testAt, testCount, tests, toString, warning

    Von Klasse geerbte Methoden Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Konstruktordetails

    • AntUnitSuite

      public AntUnitSuite(File scriptFile, Class<?> rootClass)
      Create a JUnit TestSuite that when executed will run the given ant script.

      Note that it is the responsibility of the caller to give the correct File reference. Namely, if the File is a relative file, it will be resolve relatively to the execution directory (which might be different different from the project root directory).

      Parameter:
      scriptFile - AntUnit script file
      rootClass - The test class that creates this suite. This is used to give a name to the suite so that an IDE can reexecute this suite.
  • Methodendetails

    • run

      public void run(junit.framework.TestResult testResult)

      Run the full AntUnit suite.

      Angegeben von:
      run in Schnittstelle junit.framework.Test
      Setzt außer Kraft:
      run in Klasse junit.framework.TestSuite
    • runTest

      public void runTest(junit.framework.Test test, junit.framework.TestResult result)

      Run a single test target of the AntUnit suite. suiteSetUp, setUp, tearDown and suiteTearDown are executed around it.

      Setzt außer Kraft:
      runTest in Klasse junit.framework.TestSuite
    • runInContainer

      public void runInContainer(List<String> targetList, AntUnitExecutionNotifier notifier)
      Execute the test suite in a 'container' similar to the ant 'container'.

      When ant executes a project it redirect the input and the output. In this context we will only redirect output (unit test are not supposed to be interactive).

      Parameter:
      targetList - The list of test target to execute
      notifier - The AntUnit notifier that will receive execution notifications
    • hasAntInitError

      public boolean hasAntInitError()
    • getAntInitialisationException

      public org.apache.tools.ant.BuildException getAntInitialisationException()