public class AssertionResult extends java.lang.Object implements java.io.Serializable, Searchable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
RESPONSE_WAS_NULL |
| Constructor and Description |
|---|
AssertionResult()
Deprecated.
- use the named constructor
|
AssertionResult(java.lang.String name)
Create a new Assertion Result.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getFailureMessage()
Get the message associated with any failure or error.
|
java.lang.String |
getName()
Get the name of the assertion
|
java.util.List<java.lang.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.
|
void |
setFailure(boolean f)
Set the flag indicating whether or not a failure occurred.
|
void |
setFailureMessage(java.lang.String message)
Set the failure message giving more details about a failure or error.
|
AssertionResult |
setResultForFailure(java.lang.String message)
Convenience method for setting up failed results
|
AssertionResult |
setResultForNull()
Convenience method for setting up results where the response was null
|
java.lang.String |
toString() |
public static final java.lang.String RESPONSE_WAS_NULL
@Deprecated public AssertionResult()
public AssertionResult(java.lang.String name)
name - the name of the assertionpublic java.lang.String getName()
public boolean isFailure()
public boolean isError()
public java.lang.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(java.lang.String message)
message - the message to setpublic AssertionResult setResultForFailure(java.lang.String message)
message - the message to setpublic AssertionResult setResultForNull()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.List<java.lang.String> getSearchableTokens()
throws java.lang.Exception
SearchablegetSearchableTokens in interface Searchablejava.lang.Exception - when something fails while getting the searchable tokensCopyright © 1998-2018 Apache Software Foundation. All Rights Reserved.