java.lang.Object
org.junit.platform.engine.FilterResult
@API(status=STABLE, since="1.0") public class FilterResult extends Object
The result of applying a
Filter
.- Since:
- 1.0
-
Method Summary
Modifier and Type Method Description boolean
excluded()
static FilterResult
excluded(String reason)
Factory for creating excluded results.Optional<String>
getReason()
Get the reason why the filtered object should be included or excluded, if available.boolean
included()
static FilterResult
included(String reason)
Factory for creating included results.static FilterResult
includedIf(boolean included)
Factory for creating filter results based on the condition given.static FilterResult
includedIf(boolean included, Supplier<String> inclusionReasonSupplier, Supplier<String> exclusionReasonSupplier)
Factory for creating filter results based on the condition given.String
toString()
-
Method Details
-
included
Factory for creating included results.- Parameters:
reason
- the reason why the filtered object was included- Returns:
- an included
FilterResult
with the given reason
-
excluded
Factory for creating excluded results.- Parameters:
reason
- the reason why the filtered object was excluded- Returns:
- an excluded
FilterResult
with the given reason
-
includedIf
Factory for creating filter results based on the condition given.- Parameters:
included
- whether or not the filtered object should be included- Returns:
- a valid
FilterResult
for the given condition
-
includedIf
public static FilterResult includedIf(boolean included, Supplier<String> inclusionReasonSupplier, Supplier<String> exclusionReasonSupplier)Factory for creating filter results based on the condition given.- Parameters:
included
- whether or not the filtered object should be includedinclusionReasonSupplier
- supplier for the reason in case of inclusionexclusionReasonSupplier
- supplier for the reason in case of exclusion- Returns:
- a valid
FilterResult
for the given condition
-
included
public boolean included()- Returns:
true
if the filtered object should be included
-
excluded
public boolean excluded()- Returns:
true
if the filtered object should be excluded
-
getReason
Get the reason why the filtered object should be included or excluded, if available. -
toString
-