Top Description Inners Methods
org.junit.platform.engine

public Interface DiscoveryIssue

Known Direct Implementers
org.junit.platform.engine.DefaultDiscoveryIssue
Annotations
@API
status:EXPERIMENTAL
since:6.0
Static Imports
org.apiguardian.api.API.Status.EXPERIMENTAL

DiscoveryIssue represents an issue that was encountered during test discovery by a TestEngine.
Since
1.13

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
DiscoveryIssue.Builder

Builder for creating a DiscoveryIssue.

public static enum
DiscoveryIssue.Severity

The severity of a DiscoveryIssue.

Method Summary

Modifier and TypeMethod and Description
public static DiscoveryIssue.Builder
builder(DiscoveryIssue.Severity
the severity of the issue; never null
severity
,
String
the message of the issue; never blank
message
)

Create a new Builder for creating a DiscoveryIssue with the supplied Severity and message.

public Optional<Throwable>

Returns:

the cause of this issue
cause
()

Returns the cause of this issue.

public static DiscoveryIssue
create(DiscoveryIssue.Severity
the severity of the issue; never null
severity
,
String
the message of the issue; never blank
message
)

Create a new DiscoveryIssue with the supplied Severity and message.

public String

Returns:

the message of this issue
message
()

Returns the message of this issue.

public DiscoveryIssue.Severity

Returns:

the severity of this issue
severity
()

Returns the severity of this issue.

public Optional<TestSource>

Returns:

the source of this issue
source
()

Returns the source of this issue.

public default DiscoveryIssue
withMessage(UnaryOperator<String> messageModifier)

Create a copy of this issue with the modified message produced by the supplied operator.

Method Detail

builderback to summary
public static DiscoveryIssue.Builder builder(DiscoveryIssue.Severity severity, String message)

Create a new Builder for creating a DiscoveryIssue with the supplied Severity and message.

Parameters
severity:DiscoveryIssue.Severity

the severity of the issue; never null

message:String

the message of the issue; never blank

See Also
Builder, create(Severity, String)
causeback to summary
public Optional<Throwable> cause()

Returns the cause of this issue.

Returns:Optional<Throwable>

the cause of this issue

createback to summary
public static DiscoveryIssue create(DiscoveryIssue.Severity severity, String message)

Create a new DiscoveryIssue with the supplied Severity and message.

Parameters
severity:DiscoveryIssue.Severity

the severity of the issue; never null

message:String

the message of the issue; never blank

See Also
builder(Severity, String)
messageback to summary
public String message()

Returns the message of this issue.

Returns:String

the message of this issue

severityback to summary
public DiscoveryIssue.Severity severity()

Returns the severity of this issue.

Returns:DiscoveryIssue.Severity

the severity of this issue

sourceback to summary
public Optional<TestSource> source()

Returns the source of this issue.

Returns:Optional<TestSource>

the source of this issue

withMessageback to summary
public default DiscoveryIssue withMessage(UnaryOperator<String> messageModifier)

Create a copy of this issue with the modified message produced by the supplied operator.

org.junit.platform.engine back to summary

public Interface DiscoveryIssue.Builder

Known Direct Implementers
org.junit.platform.engine.DefaultDiscoveryIssue.Builder

Builder for creating a DiscoveryIssue.

Method Summary

Modifier and TypeMethod and Description
public DiscoveryIssue
build()

Build the DiscoveryIssue.

public default DiscoveryIssue.Builder
cause(Optional<Throwable>
the Throwable that caused the DiscoveryIssue; never null but potentially empty
cause
)

Set the Throwable that caused the DiscoveryIssue.

public DiscoveryIssue.Builder
cause(@Nullable Throwable
the Throwable that caused the DiscoveryIssue; may be null
cause
)

Set the Throwable that caused the DiscoveryIssue.

public default DiscoveryIssue.Builder
source(Optional<TestSource>
the TestSource for the DiscoveryIssue; never null but potentially empty
source
)

Set the TestSource for the DiscoveryIssue.

public DiscoveryIssue.Builder
source(@Nullable TestSource
the TestSource for the DiscoveryIssue; may be null
source
)

Set the TestSource for the DiscoveryIssue.

Method Detail

buildback to summary
public DiscoveryIssue build()

Build the DiscoveryIssue.

causeback to summary
public default DiscoveryIssue.Builder cause(Optional<Throwable> cause)

Set the Throwable that caused the DiscoveryIssue.

Parameters
cause:Optional<Throwable>

the Throwable that caused the DiscoveryIssue; never null but potentially empty

causeback to summary
public DiscoveryIssue.Builder cause(@Nullable Throwable cause)

Set the Throwable that caused the DiscoveryIssue.

Parameters
cause:@Nullable Throwable

the Throwable that caused the DiscoveryIssue; may be null

sourceback to summary
public default DiscoveryIssue.Builder source(Optional<TestSource> source)

Set the TestSource for the DiscoveryIssue.

Parameters
source:Optional<TestSource>

the TestSource for the DiscoveryIssue; never null but potentially empty

sourceback to summary
public DiscoveryIssue.Builder source(@Nullable TestSource source)

Set the TestSource for the DiscoveryIssue.

Parameters
source:@Nullable TestSource

the TestSource for the DiscoveryIssue; may be null

org.junit.platform.engine back to summary

public final Enum DiscoveryIssue.Severity

extends Enum<DiscoveryIssue.Severity>
Class Inheritance

The severity of a DiscoveryIssue.

Field Summary

Modifier and TypeField and Description
public static final DiscoveryIssue.Severity
ERROR

Indicates that the engine encountered something that is definitely problematic and will lead to unexpected behavior.

public static final DiscoveryIssue.Severity
INFO

Indicates that the engine encountered something that could be potentially problematic, but could also happen due to a valid setup or configuration.

public static final DiscoveryIssue.Severity
WARNING

Indicates that the engine encountered something that is problematic and might lead to unexpected behavior or will be removed or changed in a future release.

Constructor Summary

AccessConstructor and Description
private

Method Summary

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

Field Detail

ERRORback to summary
public static final DiscoveryIssue.Severity ERROR

Indicates that the engine encountered something that is definitely problematic and will lead to unexpected behavior.

INFOback to summary
public static final DiscoveryIssue.Severity INFO

Indicates that the engine encountered something that could be potentially problematic, but could also happen due to a valid setup or configuration.

WARNINGback to summary
public static final DiscoveryIssue.Severity WARNING

Indicates that the engine encountered something that is problematic and might lead to unexpected behavior or will be removed or changed in a future release.

Constructor Detail

Severityback to summary
private Severity()

Method Detail

valueOfback to summary
public static DiscoveryIssue.Severity valueOf(String name)
valuesback to summary
public static DiscoveryIssue.Severity[] values()