类 EnabledIfCondition

    • 方法详细资料

      • evaluateAnnotation

        protected <A extends AnnotationConditionEvaluationResult evaluateAnnotation​(Class<A> annotationType,
                                                                                      Function<A,​String> expressionExtractor,
                                                                                      Function<A,​String> reasonExtractor,
                                                                                      Function<A,​Boolean> loadContextExtractor,
                                                                                      boolean enabledOnTrue,
                                                                                      ExtensionContext context)
        Evaluate the expression configured via the supplied annotation type on the AnnotatedElement for the supplied ExtensionContext.
        参数:
        annotationType - the type of annotation to process
        expressionExtractor - a function that extracts the expression from the annotation
        reasonExtractor - a function that extracts the reason from the annotation
        loadContextExtractor - a function that extracts the loadContext flag from the annotation
        enabledOnTrue - indicates whether the returned ConditionEvaluationResult should be enabled if the expression evaluates to true
        context - the ExtensionContext
        返回:
        enabled if the container or test should be enabled; otherwise disabled