Package org.gradle.api.tasks.testing
Schnittstelle TestFailureDetails
Contains serializable structural information about a test failure.
- Seit:
- 7.6
- Siehe auch:
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns a string representation of the actual value for an assertion failure.byte[]Returns the actual content of a file comparison assertion failure.The fully-qualified name of the underlying exception type.Returns a string representation of the expected value for an assertion failure.byte[]Returns the expected content of a file comparison assertion failure.Returns the failure message.Returns the stacktrace of the failure.booleanReturns true if the represented failure is recognized as an assertion failure.booleanIs this an assumption failure?booleanReturns true if the represented failure is recognized as a file comparison failure.
-
Methodendetails
-
getMessage
Returns the failure message.- Gibt zurück:
- the failure message
-
getClassName
String getClassName()The fully-qualified name of the underlying exception type.- Gibt zurück:
- the class name
-
getStacktrace
String getStacktrace()Returns the stacktrace of the failure.The instances are created on the test worker side allowing the clients not to deal with non-serializable exceptions.
- Gibt zurück:
- the stacktrace string
-
isAssertionFailure
boolean isAssertionFailure()Returns true if the represented failure is recognized as an assertion failure.- Gibt zurück:
truefor assertion failures
-
isFileComparisonFailure
boolean isFileComparisonFailure()Returns true if the represented failure is recognized as a file comparison failure.If this field is
true, then thegetExpectedContent()andgetActualContent()methods might return non-null values.- Gibt zurück:
trueif this failure is a file comparison failure- Seit:
- 8.3
-
getExpectedContent
Returns the expected content of a file comparison assertion failure.- Gibt zurück:
- the expected file contents or
nullif the test framework doesn't supply detailed information on assertion failures, or it is not a file comparison failure - Seit:
- 8.3
- Siehe auch:
-
getActualContent
Returns the actual content of a file comparison assertion failure.- Gibt zurück:
- the expected file contents or
nullif the test framework doesn't supply detailed information on assertion failures, or it is not a file comparison failure - Seit:
- 8.3
- Siehe auch:
-
getExpected
Returns a string representation of the expected value for an assertion failure.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.- Gibt zurück:
- The expected value
-
getActual
Returns a string representation of the actual value for an assertion failure.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.- Gibt zurück:
- The actual value
-
isAssumptionFailure
boolean isAssumptionFailure()Is this an assumption failure?- Gibt zurück:
- true if this is an assumption failure
- Seit:
- 8.14
-