- 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 aDiscoverySelector
by aTestEngine
.A
SelectorResolutionResult
consists of a mandatoryStatus
and an optionalThrowable
.- Since:
- 1.6
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SelectorResolutionResult.Status
Status of resolving aDiscoverySelector
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SelectorResolutionResult
failed(Throwable throwable)
Create aSelectorResolutionResult
for a failed selector resolution.SelectorResolutionResult.Status
getStatus()
Get the status of this result.Optional<Throwable>
getThrowable()
Get the throwable that caused this result, if available.static SelectorResolutionResult
resolved()
Create aSelectorResolutionResult
for a resolved selector.String
toString()
static SelectorResolutionResult
unresolved()
Create aSelectorResolutionResult
for an unresolved selector.
-
-
-
Method Detail
-
resolved
public static SelectorResolutionResult resolved()
Create aSelectorResolutionResult
for a resolved selector.- Returns:
- the
SelectorResolutionResult
; nevernull
-
unresolved
public static SelectorResolutionResult unresolved()
Create aSelectorResolutionResult
for an unresolved selector.- Returns:
- the
SelectorResolutionResult
; nevernull
-
failed
public static SelectorResolutionResult failed(Throwable throwable)
Create aSelectorResolutionResult
for a failed selector resolution.- Returns:
- the
SelectorResolutionResult
; nevernull
-
getStatus
public SelectorResolutionResult.Status getStatus()
Get the status of this result.- Returns:
- the status; never
null
-
getThrowable
public Optional<Throwable> getThrowable()
Get the throwable that caused this result, if available.- Returns:
- an
Optional
containing the throwable; nevernull
but potentially empty
-
-