Klasse AntUnitTestCase

java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.apache.ant.antunit.junit3.AntUnitTestCase
Alle implementierten Schnittstellen:
junit.framework.Test

public class AntUnitTestCase extends junit.framework.TestCase
JUnit TestCase that executes a single AntUnit target.

This class is not supposed to be used directly.

It is public only because junit must access it as a public.

  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    Prepare an AntUnitTestCase that will be executed alone.
    AntUnitTestCase(AntUnitSuite suite, File scriptFile, String target)
    Prepare an AntUnitTestCase that will be executed in a suite.
  • Methodenübersicht

    Modifikator und Typ
    Methode
    Beschreibung
    Get the AntUnit test target name.
    void
    run(junit.framework.TestResult result)
    Called by a Junit Runner that want to executes specifically this test target.
    protected void
    Normally never used because this object delegates all execution to an AntUnitSuite.

    Von Klasse geerbte Methoden junit.framework.TestCase

    assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, runBare, setName, setUp, tearDown, toString

    Von Klasse geerbte Methoden Object

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

    • AntUnitTestCase

      public AntUnitTestCase(String name)
      Prepare an AntUnitTestCase that will be executed alone.

      This constructor is typically used by a junit 3 runner that will reexecute a specific test.

      The execution of this test will be embed in a suiteSetUp and suiteTearDown.

      Parameter:
      name - The name of the AntUnitTestCase, normally obtained from a previous execution.
    • AntUnitTestCase

      public AntUnitTestCase(AntUnitSuite suite, File scriptFile, String target)
      Prepare an AntUnitTestCase that will be executed in a suite. It is the suite that prepare the antScriptRunner and the JUnitExcutionPlatform. It is the responsibility of the suite to execute the suiteSetUp and the suiteTearDown.
      Parameter:
      suite - test suite
      scriptFile - test file
      target - test target
  • Methodendetails

    • getTarget

      public String getTarget()
      Get the AntUnit test target name.
      Gibt zurück:
      target name
    • run

      public void run(junit.framework.TestResult result)
      Called by a Junit Runner that want to executes specifically this test target.

      This implementation delegates the call to the suite.

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

      protected void runTest() throws org.apache.tools.ant.BuildException
      Normally never used because this object delegates all execution to an AntUnitSuite. However, when the suite can not be created (because the ant project is invalid), this object is executed and just throws the exception.
      Setzt außer Kraft:
      runTest in Klasse junit.framework.TestCase
      Löst aus:
      org.apache.tools.ant.BuildException