Package org.junit.platform.engine
Class SelectorResolutionResult
- java.lang.Object
-
- org.junit.platform.engine.SelectorResolutionResult
-
@API(status=EXPERIMENTAL, since="1.6") public class SelectorResolutionResult extends java.lang.ObjectSelectorResolutionResultencapsulates the result of resolving aDiscoverySelectorby aTestEngine.A
SelectorResolutionResultconsists of a mandatoryStatusand an optionalThrowable.- Since:
- 1.6
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSelectorResolutionResult.StatusStatus of resolving aDiscoverySelector.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SelectorResolutionResultfailed(java.lang.Throwable throwable)Create aSelectorResolutionResultfor a failed selector resolution.SelectorResolutionResult.StatusgetStatus()Get the status of this result.java.util.Optional<java.lang.Throwable>getThrowable()Get the throwable that caused this result, if available.static SelectorResolutionResultresolved()Create aSelectorResolutionResultfor a resolved selector.java.lang.StringtoString()static SelectorResolutionResultunresolved()Create aSelectorResolutionResultfor an unresolved selector.
-
-
-
Method Detail
-
resolved
public static SelectorResolutionResult resolved()
Create aSelectorResolutionResultfor a resolved selector.- Returns:
- the
SelectorResolutionResult; nevernull
-
unresolved
public static SelectorResolutionResult unresolved()
Create aSelectorResolutionResultfor an unresolved selector.- Returns:
- the
SelectorResolutionResult; nevernull
-
failed
public static SelectorResolutionResult failed(java.lang.Throwable throwable)
Create aSelectorResolutionResultfor 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 java.util.Optional<java.lang.Throwable> getThrowable()
Get the throwable that caused this result, if available.- Returns:
- an
Optionalcontaining the throwable; nevernullbut potentially empty
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-