@Incubating public interface TestFailureDetails
TestFailure
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
getActual() |
Returns a string representation of the actual value for an assertion failure.
|
byte[] |
getActualContent() |
Returns the actual content of a file comparison assertion failure.
|
java.lang.String |
getClassName() |
The fully-qualified name of the underlying exception type.
|
java.lang.String |
getExpected() |
Returns a string representation of the expected value for an assertion failure.
|
byte[] |
getExpectedContent() |
Returns the expected content of a file comparison assertion failure.
|
java.lang.String |
getMessage() |
Returns the failure message.
|
java.lang.String |
getStacktrace() |
Returns the stacktrace of the failure.
|
boolean |
isAssertionFailure() |
Returns true if the represented failure is recognized as an assertion failure.
|
boolean |
isFileComparisonFailure() |
Returns true if the represented failure is recognized as a file comparison failure.
|
@Nullable java.lang.String getMessage()
java.lang.String getClassName()
java.lang.String getStacktrace()
The instances are created on the test worker side allowing the clients not to deal with non-serializable exceptions.
boolean isAssertionFailure()
true
for assertion failuresboolean isFileComparisonFailure()
If this field is true
, then the getExpectedContent()
and getActualContent()
methods might return non-null values.
true
if this failure is a file comparison failure@Nullable byte[] getExpectedContent()
null
if the test framework doesn't supply detailed information on assertion failures, or it is not a file comparison failureisFileComparisonFailure()
@Nullable byte[] getActualContent()
null
if the test framework doesn't supply detailed information on assertion failures, or it is not a file comparison failureisFileComparisonFailure()
@Nullable java.lang.String getExpected()
If the current instance does not represent an assertion failure, or the test failure doesn't provide any information about expected and actual values then the method returns null
.
@Nullable java.lang.String getActual()
If the current instance does not represent an assertion failure, or the test failure doesn't provide any information about expected and actual values then the method returns null
.