org.apache.ant.antunit
Class ExpectFailureTask

java.lang.Object
  extended by Sequential
      extended by org.apache.ant.antunit.ExpectFailureTask

public class ExpectFailureTask
extends Sequential

Expects the nested tasks to throw a BuildException and optinally asserts the message of that exception.

Throws a AssertFailedException if the nested tasks do not throw the expected BuildException.


Constructor Summary
ExpectFailureTask()
           
 
Method Summary
 void execute()
           
 void setExpectedMessage(java.lang.String m)
          The exception message to expect.
 void setMessage(java.lang.String m)
          The message to use in the AssertionFailedException if the nested tasks fail to raise the "correct" exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpectFailureTask

public ExpectFailureTask()
Method Detail

setExpectedMessage

public void setExpectedMessage(java.lang.String m)
The exception message to expect.


setMessage

public void setMessage(java.lang.String m)
The message to use in the AssertionFailedException if the nested tasks fail to raise the "correct" exception.


execute

public void execute()