Package org.junit.platform.launcher
Class EngineDiscoveryResult
java.lang.Object
org.junit.platform.launcher.EngineDiscoveryResult
EngineDiscoveryResult encapsulates the result of test discovery by a
TestEngine.
A EngineDiscoveryResult consists of a mandatory
Status and an optional Throwable.
- Since:
- 1.6
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final EngineDiscoveryResult.Statusprivate static final EngineDiscoveryResultprivate final Throwable -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateEngineDiscoveryResult(EngineDiscoveryResult.Status status, Throwable throwable) -
Method Summary
Modifier and TypeMethodDescriptionstatic EngineDiscoveryResultCreate aEngineDiscoveryResultfor a failed test discovery.Get the status of this result.Get the throwable that caused this result, if available.static EngineDiscoveryResultCreate aEngineDiscoveryResultfor a successful test discovery.toString()
-
Field Details
-
SUCCESSFUL_RESULT
-
status
-
throwable
-
-
Constructor Details
-
EngineDiscoveryResult
-
-
Method Details
-
successful
Create aEngineDiscoveryResultfor a successful test discovery.- Returns:
- the
EngineDiscoveryResult; nevernull
-
failed
Create aEngineDiscoveryResultfor a failed test discovery.- Parameters:
throwable- the throwable that caused the failed discovery; may benull- Returns:
- the
EngineDiscoveryResult; nevernull
-
getStatus
Get the status of this result.- Returns:
- the status; never
null
-
getThrowable
Get the throwable that caused this result, if available.- Returns:
- an
Optionalcontaining the throwable; nevernullbut potentially empty
-
toString
-