java.lang.Object
org.junit.platform.testkit.engine.TerminationInfo
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.- Since:
- 1.4
- See Also:
Execution.getTerminationInfo()
-
Method Summary
Modifier and TypeMethodDescriptionboolean
executed()
Determine if thisTerminationInfo
represents a completed execution.static TerminationInfo
executed(TestExecutionResult testExecutionResult)
Create an executedTerminationInfo
instance for the suppliedTestExecutionResult
.Get theTestExecutionResult
for the completed execution.Get the reason the execution was skipped.boolean
Determine if thisTerminationInfo
does not represent a skipped execution.boolean
skipped()
Determine if thisTerminationInfo
represents a skipped execution.static TerminationInfo
Create a skippedTerminationInfo
instance for the supplied reason.toString()
-
Method Details
-
skipped
Create a skippedTerminationInfo
instance for the supplied reason.- Parameters:
reason
- the reason the execution was skipped; may benull
- Returns:
- the created
TerminationInfo
; nevernull
- See Also:
executed(TestExecutionResult)
-
executed
Create an executedTerminationInfo
instance for the suppliedTestExecutionResult
.- Parameters:
testExecutionResult
- the result of the execution; nevernull
- Returns:
- the created
TerminationInfo
; nevernull
- See Also:
skipped(String)
-
skipped
public boolean skipped()Determine if thisTerminationInfo
represents a skipped execution.- Returns:
true
if this thisTerminationInfo
represents a skipped execution
-
notSkipped
public boolean notSkipped()Determine if thisTerminationInfo
does not represent a skipped execution.- Returns:
true
if this thisTerminationInfo
does not represent a skipped execution
-
executed
public boolean executed()Determine if thisTerminationInfo
represents a completed execution.- Returns:
true
if this thisTerminationInfo
represents a completed execution
-
getSkipReason
Get the reason the execution was skipped.- Returns:
- the reason the execution was skipped
- Throws:
UnsupportedOperationException
- if thisTerminationInfo
does not represent a skipped execution
-
getExecutionResult
Get theTestExecutionResult
for the completed execution.- Returns:
- the result of the completed execution
- Throws:
UnsupportedOperationException
- if thisTerminationInfo
does not represent a completed execution
-
toString
-