@API(status=EXPERIMENTAL, since="1.6") public class EngineDiscoveryResult extends Object
EngineDiscoveryResult
encapsulates the result of test discovery by a
TestEngine
.
A EngineDiscoveryResult
consists of a mandatory
Status
and an optional Throwable
.
Modifier and Type | Class and Description |
---|---|
static class |
EngineDiscoveryResult.Status
Status of test discovery by a
TestEngine . |
Modifier and Type | Method and Description |
---|---|
static EngineDiscoveryResult |
failed(Throwable throwable)
Create a
EngineDiscoveryResult 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 a
EngineDiscoveryResult for a successful test
discovery. |
String |
toString() |
public static EngineDiscoveryResult successful()
EngineDiscoveryResult
for a successful test
discovery.EngineDiscoveryResult
; never null
public static EngineDiscoveryResult failed(Throwable throwable)
EngineDiscoveryResult
for a failed test
discovery.throwable
- the throwable that caused the failed discovery; may be
null
EngineDiscoveryResult
; never null
public EngineDiscoveryResult.Status getStatus()
null
public Optional<Throwable> getThrowable()
Optional
containing the throwable; never null
but potentially emptyCopyright © 2020. All rights reserved.