类 ProfileValueChecker

java.lang.Object
org.junit.runners.model.Statement
cn.taketoday.test.context.junit4.statements.ProfileValueChecker

public class ProfileValueChecker extends org.junit.runners.model.Statement
ProfileValueChecker is a custom JUnit Statement that checks whether a test class or test method is enabled in the current environment via Framework's @IfProfileValue annotation.
从以下版本开始:
4.0
作者:
Sam Brannen, Philippe Marschall
另请参阅:
  • 字段详细资料

    • next

      private final org.junit.runners.model.Statement next
    • testClass

      private final Class<?> testClass
    • testMethod

      @Nullable private final Method testMethod
  • 构造器详细资料

    • ProfileValueChecker

      public ProfileValueChecker(org.junit.runners.model.Statement next, Class<?> testClass, @Nullable Method testMethod)
      Construct a new ProfileValueChecker statement.
      参数:
      next - the next Statement in the execution chain; never null
      testClass - the test class to check; never null
      testMethod - the test method to check; may be null if this ProfileValueChecker is being applied at the class level
  • 方法详细资料

    • evaluate

      public void evaluate() throws Throwable
      Determine if the test specified by arguments to the constructor is enabled in the current environment, as configured via the @IfProfileValue annotation.

      If the test is not annotated with @IfProfileValue it is considered enabled.

      If a test is not enabled, this method will abort further evaluation of the execution chain with a failed assumption; otherwise, this method will simply evaluate the next Statement in the execution chain.

      指定者:
      evaluate 在类中 org.junit.runners.model.Statement
      抛出:
      org.junit.AssumptionViolatedException - if the test is disabled
      Throwable - if evaluation of the next statement fails
      另请参阅: