Package org.testframe.engine
Class TestResult
java.lang.Object
org.testframe.engine.TestResult
Holds the results of a test. Includes a
Throwable if it was
provided to hold the stack trace.- Since:
- 1.0
- Author:
- Alonso del Arte
-
Constructor Summary
ConstructorsConstructorDescriptionTestResult(Method procedure, TestResultStatus status, Throwable information) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves theThrowablethat was provided to the constructor.Gets the test procedure the result is for.Gets the test result status.booleanTells whether the result has a stack trace or not.
-
Constructor Details
-
TestResult
Constructor.- Parameters:
procedure- The test procedure the test result is for. Such as, for example,testNoDivisionByZero().status- The test result status, one ofTestResultStatus.PASSED,TestResultStatus.FAILED,TestResultStatus.ERRORorTestResultStatus.SKIPPED.information- An error or exception object presumably holding a stack trace pertinent to the test, or null if not applicable (such as ought to be the case for a passing or skipped test). For example, anArithmeticExceptionobject with a stack trace that includes a line intestNoDivisionByZero().
-
-
Method Details
-
getProcedure
Gets the test procedure the result is for.- Returns:
- The test procedure the result is for. Such as, for example,
testNoDivisionByZero().
-
getStatus
Gets the test result status.- Returns:
- The test result status, one of
TestResultStatus.PASSED,TestResultStatus.FAILED,TestResultStatus.ERRORorTestResultStatus.SKIPPED.
-
hasStackTrace
public boolean hasStackTrace()Tells whether the result has a stack trace or not.- Returns:
- True if a
Throwableobject presumably holding a stack trace was provided to the constructor, false otherwise.
-
getInformation
Retrieves theThrowablethat was provided to the constructor.- Returns:
- A
Throwableobject that presumably holds a stack trace.
-