| Modifier and Type | Class and Description |
|---|---|
static class |
TestExecutionResult.Status
Status of executing a single test or container.
|
| Modifier and Type | Field and Description |
|---|---|
private TestExecutionResult.Status |
status |
private static TestExecutionResult |
SUCCESSFUL_RESULT |
private java.lang.Throwable |
throwable |
| Modifier | Constructor and Description |
|---|---|
private |
TestExecutionResult(TestExecutionResult.Status status,
java.lang.Throwable throwable) |
| Modifier and Type | Method and Description |
|---|---|
static TestExecutionResult |
aborted(java.lang.Throwable throwable)
Create a
TestExecutionResult for an aborted execution
of a test or container with the supplied throwable. |
static TestExecutionResult |
failed(java.lang.Throwable throwable)
Create a
TestExecutionResult for a failed execution
of a test or container with the supplied throwable. |
TestExecutionResult.Status |
getStatus()
Get the status of this result.
|
java.util.Optional<java.lang.Throwable> |
getThrowable()
Get the throwable that caused this result, if available.
|
static TestExecutionResult |
successful()
Create a
TestExecutionResult for a successful execution
of a test or container. |
java.lang.String |
toString() |
private static final TestExecutionResult SUCCESSFUL_RESULT
private final TestExecutionResult.Status status
private final java.lang.Throwable throwable
private TestExecutionResult(TestExecutionResult.Status status, java.lang.Throwable throwable)
public static TestExecutionResult successful()
TestExecutionResult for a successful execution
of a test or container.TestExecutionResult; never nullpublic static TestExecutionResult aborted(java.lang.Throwable throwable)
TestExecutionResult for an aborted execution
of a test or container with the supplied throwable.throwable - the throwable that caused the aborted execution; may be
nullTestExecutionResult; never nullpublic static TestExecutionResult failed(java.lang.Throwable throwable)
TestExecutionResult for a failed execution
of a test or container with the supplied throwable.throwable - the throwable that caused the failed execution; may be
nullTestExecutionResult; never nullpublic TestExecutionResult.Status getStatus()
nullpublic java.util.Optional<java.lang.Throwable> getThrowable()
Optional containing the throwable; never null
but potentially emptypublic java.lang.String toString()
toString in class java.lang.Object