Top Description Inners Fields Constructors Methods
org.junit.platform.engine

public Class SelectorResolutionResult

extends Object
Class Inheritance
Annotations
@API
status:STABLE
since:1.10
Static Imports
org.apiguardian.api.API.Status.STABLE

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 and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
private static final SelectorResolutionResult
private final SelectorResolutionResult.Status
private final @Nullable Throwable
private static final SelectorResolutionResult

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static SelectorResolutionResult

Returns:

the SelectorResolutionResult; never null
failed
(Throwable throwable)

Create a SelectorResolutionResult for a failed selector resolution.

public SelectorResolutionResult.Status

Returns:

the status; never null
getStatus
()

Get the status of this result.

public Optional<Throwable>

Returns:

an Optional containing the throwable; never null but potentially empty
getThrowable
()

Get the throwable that caused this result, if available.

public static SelectorResolutionResult

Returns:

the SelectorResolutionResult; never null
resolved
()

Create a SelectorResolutionResult for a resolved selector.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public static SelectorResolutionResult

Returns:

the SelectorResolutionResult; never null
unresolved
()

Create a SelectorResolutionResult for an unresolved selector.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

RESOLVED_RESULTback to summary
private static final SelectorResolutionResult RESOLVED_RESULT
statusback to summary
private final SelectorResolutionResult.Status status
throwableback to summary
private final @Nullable Throwable throwable
UNRESOLVED_RESULTback to summary
private static final SelectorResolutionResult UNRESOLVED_RESULT

Constructor Detail

SelectorResolutionResultback to summary
private SelectorResolutionResult(SelectorResolutionResult.Status status, @Nullable Throwable throwable)

Method Detail

failedback to summary
public static SelectorResolutionResult failed(Throwable throwable)

Create a SelectorResolutionResult for a failed selector resolution.

Returns:SelectorResolutionResult

the SelectorResolutionResult; never null

getStatusback to summary
public SelectorResolutionResult.Status getStatus()

Get the status of this result.

Returns:SelectorResolutionResult.Status

the status; never null

getThrowableback to summary
public Optional<Throwable> getThrowable()

Get the throwable that caused this result, if available.

Returns:Optional<Throwable>

an Optional containing the throwable; never null but potentially empty

resolvedback to summary
public static SelectorResolutionResult resolved()

Create a SelectorResolutionResult for a resolved selector.

Returns:SelectorResolutionResult

the SelectorResolutionResult; never null

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
unresolvedback to summary
public static SelectorResolutionResult unresolved()

Create a SelectorResolutionResult for an unresolved selector.

Returns:SelectorResolutionResult

the SelectorResolutionResult; never null

org.junit.platform.engine back to summary

public final Enum SelectorResolutionResult.Status

extends Enum<SelectorResolutionResult.Status>
Class Inheritance

Status of resolving a DiscoverySelector.

Field Summary

Modifier and TypeField and Description
public static final SelectorResolutionResult.Status
FAILED

Indicates that the TestEngine has encountered an error while resolving the selector.

public static final SelectorResolutionResult.Status
RESOLVED

Indicates that the TestEngine has successfully resolved the selector.

public static final SelectorResolutionResult.Status
UNRESOLVED

Indicates that the TestEngine was unable to resolve the selector.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static SelectorResolutionResult.Status
public static SelectorResolutionResult.Status[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

FAILEDback to summary
public static final SelectorResolutionResult.Status FAILED

Indicates that the TestEngine has encountered an error while resolving the selector.

RESOLVEDback to summary
public static final SelectorResolutionResult.Status RESOLVED

Indicates that the TestEngine has successfully resolved the selector.

UNRESOLVEDback to summary
public static final SelectorResolutionResult.Status UNRESOLVED

Indicates that the TestEngine was unable to resolve the selector.

Constructor Detail

Statusback to summary
private Status()

Method Detail

valueOfback to summary
public static SelectorResolutionResult.Status valueOf(String name)
valuesback to summary
public static SelectorResolutionResult.Status[] values()