Class 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 org.apache.tools.ant.BuildException ex  
      static java.lang.String NAME
      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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.tools.ant.BuildException getAntScriptError()  
      protected void runTest()  
      • 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 Detail

      • NAME

        public static final java.lang.String NAME
        The name we use for the error test case ('warning')
        See Also:
        Constant Field Values
      • ex

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

      • 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 Detail

      • 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()