Package org.junit.platform.engine
Interface DiscoveryIssue
-
- All Known Implementing Classes:
DefaultDiscoveryIssue
@API(status=MAINTAINED, since="1.13.3") public interface DiscoveryIssueDiscoveryIssuerepresents an issue that was encountered during test discovery by aTestEngine.- Since:
- 1.13
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceDiscoveryIssue.BuilderBuilder for creating aDiscoveryIssue.static classDiscoveryIssue.SeverityThe severity of aDiscoveryIssue.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static DiscoveryIssue.Builderbuilder(DiscoveryIssue.Severity severity, java.lang.String message)Create a newDiscoveryIssue.Builderfor creating aDiscoveryIssuewith the suppliedDiscoveryIssue.Severityand message.java.util.Optional<java.lang.Throwable>cause(){@return the cause of this issue}static DiscoveryIssuecreate(DiscoveryIssue.Severity severity, java.lang.String message)Create a newDiscoveryIssuewith the suppliedDiscoveryIssue.Severityand message.java.lang.Stringmessage(){@return the message of this issue}DiscoveryIssue.Severityseverity(){@return the severity of this issue}java.util.Optional<TestSource>source(){@return the source of this issue}default DiscoveryIssuewithMessage(java.util.function.UnaryOperator<java.lang.String> messageModifier)Create a copy of this issue with the modified message produced by the supplied operator.
-
-
-
Method Detail
-
create
static DiscoveryIssue create(DiscoveryIssue.Severity severity, java.lang.String message)
Create a newDiscoveryIssuewith the suppliedDiscoveryIssue.Severityand message.- Parameters:
severity- the severity of the issue; nevernullmessage- the message of the issue; never blank- See Also:
builder(Severity, String)
-
builder
static DiscoveryIssue.Builder builder(DiscoveryIssue.Severity severity, java.lang.String message)
Create a newDiscoveryIssue.Builderfor creating aDiscoveryIssuewith the suppliedDiscoveryIssue.Severityand message.- Parameters:
severity- the severity of the issue; nevernullmessage- the message of the issue; never blank- See Also:
DiscoveryIssue.Builder,create(Severity, String)
-
severity
DiscoveryIssue.Severity severity()
{@return the severity of this issue}
-
message
java.lang.String message()
{@return the message of this issue}
-
source
java.util.Optional<TestSource> source()
{@return the source of this issue}
-
cause
java.util.Optional<java.lang.Throwable> cause()
{@return the cause of this issue}
-
withMessage
default DiscoveryIssue withMessage(java.util.function.UnaryOperator<java.lang.String> messageModifier)
Create a copy of this issue with the modified message produced by the supplied operator.
-
-