org.apache.ant.antunit.junit3
Class ErrorTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by 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
static java.lang.String NAME
          The name we use for the error test case ('warning')
 
Constructor Summary
ErrorTestCase(BuildException antScriptError)
          Creates a TestCase that will report the Ant BuildException when running.
 
Method Summary
 BuildException getAntScriptError()
           
protected  void runTest()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
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, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
The name we use for the error test case ('warning')

See Also:
Constant Field Values
Constructor Detail

ErrorTestCase

public ErrorTestCase(BuildException antScriptError)
Creates a TestCase that will report the Ant BuildException when running.

Parameters:
antScriptError - The Ant BuildException that triggered the initialization failure
Method Detail

runTest

protected void runTest()
                throws BuildException
Overrides:
runTest in class junit.framework.TestCase
Throws:
BuildException

getAntScriptError

public BuildException getAntScriptError()