public class DisabledIfCondition extends AbstractExpressionEvaluatingCondition
DisabledIfCondition
is a composite ContainerExecutionCondition
and TestExecutionCondition
that supports the @DisabledIf
annotation when using the Spring TestContext Framework in conjunction
with JUnit 5's Jupiter programming model.
Any attempt to use the DisabledIfCondition
without the presence of
@DisabledIf
will result in an enabled
ConditionEvaluationResult
.
DisabledIf
,
EnabledIf
,
SpringExtension
Constructor and Description |
---|
DisabledIfCondition() |
Modifier and Type | Method and Description |
---|---|
ConditionEvaluationResult |
evaluate(ContainerExtensionContext context)
Containers are disabled if
@DisabledIf is present on the test class
and the configured expression evaluates to true . |
ConditionEvaluationResult |
evaluate(TestExtensionContext context)
Tests are disabled if
@DisabledIf is present on the test method
and the configured expression evaluates to true . |
private ConditionEvaluationResult |
evaluateDisabledIf(ExtensionContext context) |
evaluateAnnotation
public ConditionEvaluationResult evaluate(ContainerExtensionContext context)
@DisabledIf
is present on the test class
and the configured expression evaluates to true
.public ConditionEvaluationResult evaluate(TestExtensionContext context)
@DisabledIf
is present on the test method
and the configured expression evaluates to true
.private ConditionEvaluationResult evaluateDisabledIf(ExtensionContext context)