org.apache.ant.antunit
Class ExpectFailureTask
java.lang.Object
Sequential
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.
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 |
ExpectFailureTask
public ExpectFailureTask()
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()