Class ErrorTestCase

java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.apache.ant.antunit.junit3.ErrorTestCase
All Implemented Interfaces:
junit.framework.Test

public class ErrorTestCase extends junit.framework.TestCase
A TestCase that will just report an error when running. This is pretty useful when an error is detected during initialization.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final org.apache.tools.ant.BuildException
     
    static final String
    The name we use for the error test case ('warning')
  • Constructor Summary

    Constructors
    Constructor
    Description
    ErrorTestCase(org.apache.tools.ant.BuildException antScriptError)
    Creates a TestCase that will report the Ant BuildException when running.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.tools.ant.BuildException
     
    protected void
     

    Methods inherited from class 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, run, runBare, setName, setUp, tearDown, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • NAME

      public static final String NAME
      The name we use for the error test case ('warning')
      See Also:
    • ex

      private final org.apache.tools.ant.BuildException ex
  • Constructor Details

    • ErrorTestCase

      public ErrorTestCase(org.apache.tools.ant.BuildException antScriptError)
      Creates a TestCase that will report the Ant BuildException when running.
      Parameters:
      antScriptError - The Ant BuildException that triggered the initialization failure
  • Method Details

    • runTest

      protected void runTest() throws org.apache.tools.ant.BuildException
      Overrides:
      runTest in class junit.framework.TestCase
      Throws:
      org.apache.tools.ant.BuildException
    • getAntScriptError

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