TerminationInfo is a union type that allows propagation of terminated
container/test state, supporting either the reason if the container/test
was skipped or the TestExecutionResult if the container/test was executed.
Execution#getTerminationInfo()
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final @Nullable String | |
| private final @Nullable TestExecutionResult |
| Access | Constructor and Description |
|---|---|
| private | TerminationInfo(boolean skipped, @Nullable String skipReason, @Nullable TestExecutionResult testExecutionResult)
|
| Modifier and Type | Method and Description |
|---|---|
| public static TerminationInfo | Returns: the createdTerminationInfo; never nullthe result of the execution; never testExecutionResult)nullCreate an executed |
| public boolean | Returns: true if this this TerminationInfo represents a
completed executionDetermine if this |
| public TestExecutionResult | Returns: the result of the completed executionGet the |
| public @Nullable String | Returns: the reason the execution was skippedGet the reason the execution was skipped. |
| public boolean | Returns: true if this this TerminationInfo does not
represent a skipped executionDetermine if this |
| public static TerminationInfo | |
| public boolean | Returns: true if this this TerminationInfo represents a
skipped executionDetermine if this |
| public String |
| skipped | back to summary |
|---|---|
| private final boolean skipped | |
| skipReason | back to summary |
|---|---|
| private final @Nullable String skipReason | |
| testExecutionResult | back to summary |
|---|---|
| private final @Nullable TestExecutionResult testExecutionResult | |
| TerminationInfo | back to summary |
|---|---|
| private TerminationInfo(boolean skipped, @Nullable String skipReason, @Nullable TestExecutionResult testExecutionResult) | |
| executed | back to summary |
|---|---|
| public static TerminationInfo executed(TestExecutionResult testExecutionResult) Create an executed
| |
| executed | back to summary |
|---|---|
| public boolean executed() Determine if this
| |
| getExecutionResult | back to summary |
|---|---|
| public TestExecutionResult getExecutionResult() throws UnsupportedOperationException Get the
| |
| getSkipReason | back to summary |
|---|---|
| public @Nullable String getSkipReason() throws UnsupportedOperationException Get the reason the execution was skipped.
| |
| notSkipped | back to summary |
|---|---|
| public boolean notSkipped() Determine if this
| |
| skipped | back to summary |
|---|---|
| public static TerminationInfo skipped(@Nullable String reason) Create a skipped
| |
| skipped | back to summary |
|---|---|
| public boolean skipped() Determine if this
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |