java.lang.Object
org.junit.platform.engine.SelectorResolutionResult
@API(status=EXPERIMENTAL, since="1.6") public class SelectorResolutionResult extends Object
SelectorResolutionResult encapsulates the result of resolving a
DiscoverySelector by a TestEngine.
A SelectorResolutionResult consists of a mandatory
Status and an optional Throwable.
- Since:
- 1.6
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSelectorResolutionResult.StatusStatus of resolving aDiscoverySelector. -
Method Summary
Modifier and Type Method Description static SelectorResolutionResultfailed(Throwable throwable)Create aSelectorResolutionResultfor a failed selector resolution.SelectorResolutionResult.StatusgetStatus()Get the status of this result.Optional<Throwable>getThrowable()Get the throwable that caused this result, if available.static SelectorResolutionResultresolved()Create aSelectorResolutionResultfor a resolved selector.StringtoString()static SelectorResolutionResultunresolved()Create aSelectorResolutionResultfor an unresolved selector.
-
Method Details
-
resolved
Create aSelectorResolutionResultfor a resolved selector.- Returns:
- the
SelectorResolutionResult; nevernull
-
unresolved
Create aSelectorResolutionResultfor an unresolved selector.- Returns:
- the
SelectorResolutionResult; nevernull
-
failed
Create aSelectorResolutionResultfor a failed selector resolution.- Returns:
- the
SelectorResolutionResult; nevernull
-
getStatus
Get the status of this result.- Returns:
- the status; never
null
-
getThrowable
Get the throwable that caused this result, if available.- Returns:
- an
Optionalcontaining the throwable; nevernullbut potentially empty
-
toString
-