Serializable
CompareAssertionResult
public class AssertionResult extends Object implements Serializable
Modifier and Type | Field | Description |
---|---|---|
static String |
RESPONSE_WAS_NULL |
Constructor | Description |
---|---|
AssertionResult() |
Deprecated.
- use the named constructor
|
AssertionResult(String name) |
Create a new Assertion Result.
|
Modifier and Type | Method | Description |
---|---|---|
String |
getFailureMessage() |
Get the message associated with any failure or error.
|
String |
getName() |
Get the name of the assertion
|
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(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()
Copyright © 1998-2018 Apache Software Foundation. All Rights Reserved.