public class AssertionResult extends Object implements Serializable, Searchable
Modifier and Type | Field and Description |
---|---|
static String |
RESPONSE_WAS_NULL |
Constructor and Description |
---|
AssertionResult()
Deprecated.
- use the named constructor
|
AssertionResult(String name)
Create a new Assertion Result.
|
Modifier and Type | Method and Description |
---|---|
String |
getFailureMessage()
Get the message associated with any failure or error.
|
String |
getName()
Get the name of the assertion
|
List<String> |
getSearchableTokens()
Get a list of all tokens that should be visible to searching
|
boolean |
isError()
Check if an error occurred while checking the assertion.
|
boolean |
isFailure()
Check if the assertion failed.
|
void |
setError(boolean e)
Set the flag indicating whether or not an error occurred while evaluating assertion failure clause.
|
void |
setFailure(boolean f)
Set the flag indicating whether or not a failure occurred.
|
void |
setFailureMessage(String message)
Set the failure message giving more details about a failure or error.
|
AssertionResult |
setResultForFailure(String message)
Convenience method for setting up failed results
|
AssertionResult |
setResultForNull()
Convenience method for setting up results where the response was null
|
String |
toString() |
public static final String RESPONSE_WAS_NULL
@Deprecated public AssertionResult()
public AssertionResult(String name)
name
- the name of the assertionpublic String getName()
public boolean isFailure()
public boolean isError()
public String getFailureMessage()
public void setError(boolean e)
e
- true if an error occurred, false otherwisepublic void setFailure(boolean f)
f
- true if a failure occurred, false otherwisepublic void setFailureMessage(String message)
message
- the message to setpublic AssertionResult setResultForFailure(String message)
message
- the message to setpublic AssertionResult setResultForNull()
public List<String> getSearchableTokens() throws Exception
Searchable
getSearchableTokens
in interface Searchable
Exception
- when something fails while getting the searchable tokensCopyright © 1998-2019 Apache Software Foundation. All Rights Reserved.