类 EnabledIfCondition

所有已实现的接口:
org.junit.jupiter.api.extension.ExecutionCondition, org.junit.jupiter.api.extension.Extension

public class EnabledIfCondition extends AbstractExpressionEvaluatingCondition
EnabledIfCondition is an ExecutionCondition that supports the @EnabledIf annotation when using the Infra TestContext Framework in conjunction with JUnit 5's Jupiter programming model.

Any attempt to use the EnabledIfCondition without the presence of @EnabledIf will result in an enabled ConditionEvaluationResult.

从以下版本开始:
4.0
作者:
Sam Brannen
另请参阅:
  • 构造器详细资料

    • EnabledIfCondition

      public EnabledIfCondition()
  • 方法详细资料

    • evaluateExecutionCondition

      public org.junit.jupiter.api.extension.ConditionEvaluationResult evaluateExecutionCondition(org.junit.jupiter.api.extension.ExtensionContext context)
      Containers and tests are enabled if @EnabledIf is present on the corresponding test class or test method and the configured expression evaluates to true.