public class ExpectFailureTask
extends org.apache.tools.ant.taskdefs.Sequential
Throws a AssertFailedException if the nested tasks do not throw the expected BuildException.
Constructor and Description |
---|
ExpectFailureTask() |
Modifier and Type | Method and Description |
---|---|
void |
execute() |
void |
setExpectedMessage(String m)
The exception message to expect.
|
void |
setMessage(String m)
The message to use in the AssertionFailedException if the nested
tasks fail to raise the "correct" exception.
|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
public void setExpectedMessage(String m)
m
- the exception message to expectpublic void setMessage(String m)
m
- message to use in the AssertionFailedExceptionpublic void execute()
execute
in class org.apache.tools.ant.taskdefs.Sequential
Copyright © 2022 The Apache Software Foundation. All rights reserved.