AssertionFailedError is a common base class for test-related
AssertionErrors.
In addition to a message and a cause, this class stores the expected
and actual values of an assertion using the ValueWrapper type.
| Modifier and Type | Field and Description |
|---|---|
| private final ValueWrapper | |
| private final ValueWrapper | |
| private static final Throwable | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | AssertionFailedError()
Constructs an |
| public | AssertionFailedError(String
the detail message; message)null or blank will be
converted to the empty StringConstructs an |
| public | AssertionFailedError(String
the detail message; message, Object null or blank will be
converted to the empty Stringthe expected value; may be expected, Object nullthe actual value; may be actual)nullConstructs an |
| public | AssertionFailedError(String
the detail message; message, Throwable null or blank will be
converted to the empty Stringthe cause of the failure cause)Constructs an |
| public | AssertionFailedError(String
the detail message; message, Object null or blank will be
converted to the empty Stringthe expected value; may be expected, Object nullthe actual value; may be actual, Throwable nullthe cause of the failure cause)Constructs an |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public ValueWrapper | |
| public ValueWrapper | |
| public boolean | |
| public boolean | |
| public String | Returns: a string representation of thisAssertionFailedErrorOverrides java. Throwable#toString().
|
| actual | back to summary |
|---|---|
| private final ValueWrapper actual | |
| expected | back to summary |
|---|---|
| private final ValueWrapper expected | |
| NO_CAUSE | back to summary |
|---|---|
| private static final Throwable NO_CAUSE | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| AssertionFailedError | back to summary |
|---|---|
| public AssertionFailedError() Constructs an | |
| AssertionFailedError | back to summary |
|---|---|
| public AssertionFailedError(String message) Constructs an
| |
| AssertionFailedError | back to summary |
|---|---|
| public AssertionFailedError(String message, Object expected, Object actual) Constructs an Actual and expected values may be | |
| AssertionFailedError | back to summary |
|---|---|
| public AssertionFailedError(String message, Throwable cause) Constructs an | |
| AssertionFailedError | back to summary |
|---|---|
| public AssertionFailedError(String message, Object expected, Object actual, Throwable cause) Constructs an | |
| AssertionFailedError | back to summary |
|---|---|
| private AssertionFailedError(String message, ValueWrapper expected, ValueWrapper actual, Throwable cause) | |
| getActual | back to summary |
|---|---|
| public ValueWrapper getActual() Returns the wrapped actual value if it is defined; otherwise
| |
| getExpected | back to summary |
|---|---|
| public ValueWrapper getExpected() Returns the wrapped expected value if it is defined; otherwise
| |
| isActualDefined | back to summary |
|---|---|
| public boolean isActualDefined() Returns
| |
| isExpectedDefined | back to summary |
|---|---|
| public boolean isExpectedDefined() Returns
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a short description of this assertion error using the same format
as Since the constructors of this class convert supplied | |