- java.lang.Object
-
- org.junit.platform.launcher.EngineDiscoveryResult
-
@API(status=EXPERIMENTAL, since="1.6") public class EngineDiscoveryResult extends Object
EngineDiscoveryResult
encapsulates the result of test discovery by aTestEngine
.A
EngineDiscoveryResult
consists of a mandatoryStatus
and an optionalThrowable
.- Since:
- 1.6
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EngineDiscoveryResult.Status
Status of test discovery by aTestEngine
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EngineDiscoveryResult
failed(Throwable throwable)
Create aEngineDiscoveryResult
for a failed test discovery.EngineDiscoveryResult.Status
getStatus()
Get the status of this result.Optional<Throwable>
getThrowable()
Get the throwable that caused this result, if available.static EngineDiscoveryResult
successful()
Create aEngineDiscoveryResult
for a successful test discovery.String
toString()
-
-
-
Method Detail
-
successful
public static EngineDiscoveryResult successful()
Create aEngineDiscoveryResult
for a successful test discovery.- Returns:
- the
EngineDiscoveryResult
; nevernull
-
failed
public static EngineDiscoveryResult failed(Throwable throwable)
Create aEngineDiscoveryResult
for a failed test discovery.- Parameters:
throwable
- the throwable that caused the failed discovery; may benull
- Returns:
- the
EngineDiscoveryResult
; nevernull
-
getStatus
public EngineDiscoveryResult.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
-
-