Module org.junit.jupiter.api
Package org.junit.jupiter.api.extension
Class ConditionEvaluationResult
java.lang.Object
org.junit.jupiter.api.extension.ConditionEvaluationResult
The result of evaluating an
ExecutionCondition
.- Since:
- 5.0
-
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- Returns:
- an enabled
ConditionEvaluationResult
with the given reason
-
disabled
Factory for creating disabled results.- Parameters:
reason
- the reason why the container or test should be disabled- Returns:
- a disabled
ConditionEvaluationResult
with the given reason
-
disabled
@API(status=STABLE, since="5.7") public static ConditionEvaluationResult disabled(String reason, String customReason) Factory for creating disabled results with custom reasons added by the user.- Parameters:
reason
- the default reason why the container or test should be disabledcustomReason
- the custom reason why the container or test should be disabled- Returns:
- a disabled
ConditionEvaluationResult
with the given reasons - Since:
- 5.7
-
isDisabled
public boolean isDisabled()Whether the container or test should be disabled.- Returns:
true
if the container or test should be disabled
-
getReason
Get the reason why the container or test should be enabled or disabled, if available. -
toString
-