public class EnabledIfCondition extends ObjectSE
EnabledIfCondition は、Spring TestContext フレームワークを JUnit 5 の Jupiter プログラミングモデルと組み合わせて使用するときに @EnabledIf アノテーションをサポートする ExecutionCondition です。@EnabledIf が存在しない状態で EnabledIfCondition を使用しようとすると、ConditionEvaluationResult が有効になります。
EnabledIf, DisabledIf, SpringExtension| コンストラクターと説明 |
|---|
EnabledIfCondition() |
| 修飾子と型 | メソッドと説明 |
|---|---|
protected <A extends AnnotationSE> | evaluateAnnotation(ClassSE<A> annotationType, FunctionSE<A,StringSE> expressionExtractor, FunctionSE<A,StringSE> reasonExtractor, FunctionSE<A,BooleanSE> loadContextExtractor, boolean enabledOnTrue, ExtensionContext context) 提供された ExtensionContext について、AnnotatedElementSE の提供されたアノテーション型を介して構成された式を評価します。 |
ConditionEvaluationResult | evaluateExecutionCondition(ExtensionContext context) 対応するテストクラスまたはテストメソッドに @EnabledIf が存在し、構成された式が true と評価される場合、コンテナーとテストが有効になります。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEpublic ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context)
@EnabledIf が存在し、構成された式が true と評価される場合、コンテナーとテストが有効になります。protected <A extends AnnotationSE> ConditionEvaluationResult evaluateAnnotation(ClassSE<A> annotationType, FunctionSE<A,StringSE> expressionExtractor, FunctionSE<A,StringSE> reasonExtractor, FunctionSE<A,BooleanSE> loadContextExtractor, boolean enabledOnTrue, ExtensionContext context)
ExtensionContext について、AnnotatedElementSE の提供されたアノテーション型を介して構成された式を評価します。annotationType - 処理するアノテーションの型 expressionExtractor - アノテーションから式を抽出する関数 reasonExtractor - アノテーションから理由を抽出する関数 loadContextExtractor - アノテーションから loadContext フラグを抽出する関数 enabledOnTrue - 式が true と評価された場合、返される ConditionEvaluationResult が enabled であるかどうかを示します context - ExtensionContextenabled。それ以外の場合は disabled