Class ConditionEvaluationResult
java.lang.Object
org.junit.jupiter.api.extension.ConditionEvaluationResult
-
Method Summary
Modifier and TypeMethodDescriptionstatic ConditionEvaluationResult
Factory for creating disabled results.static ConditionEvaluationResult
Factory for creating disabled results with custom reasons added by the user.static ConditionEvaluationResult
Factory for creating enabled results.Get the reason why the container or test should be enabled or disabled, if available.boolean
Whether the container or test should be disabled.toString()
-
Method Details
-
enabled
Factory for creating enabled results.- Parameters:
reason
- the reason why the container or test should be enabled; may benull
or blank if the reason is unknown- Returns:
- an enabled
ConditionEvaluationResult
with the given reason or an empty reason if the reason is unknown - See Also:
-
disabled
Factory for creating disabled results.- Parameters:
reason
- the reason why the container or test should be disabled; may benull
or blank if the reason is unknown- Returns:
- a disabled
ConditionEvaluationResult
with the given reason or an empty reason if the reason is unknown - See Also:
-
disabled
@API(status=STABLE, since="5.7") public static ConditionEvaluationResult disabled(@Nullable String reason, @Nullable String customReason) Factory for creating disabled results with custom reasons added by the user.If non-blank default and custom reasons are provided, they will be concatenated using the format:
"reason ==> customReason"
.- Parameters:
reason
- the default reason why the container or test should be disabled; may benull
or blank if the default reason is unknowncustomReason
- the custom reason why the container or test should be disabled; may benull
or blank if the custom reason is unknown- Returns:
- a disabled
ConditionEvaluationResult
with the given reason(s) or an empty reason if the reasons are unknown - Since:
- 5.7
- See Also:
-
isDisabled
public boolean isDisabled()Whether the container or test should be disabled.- Returns:
true
if the container or test should be disabled
-
getReason
-
toString
-