File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
documentation/src/docs/asciidoc/user-guide Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -538,10 +538,18 @@ package example;
538
538
include::{testDir}/example/ExternalCustomConditionDemo.java[tags=user_guide_external_custom_condition]
539
539
----
540
540
541
- NOTE: When `@EnabledIf` or `@DisabledIf` is used at class level, the condition method must
542
- always be `static`. Condition methods located in external classes must also be `static`.
541
+ [NOTE]
542
+ ====
543
+ There are several cases where a condition method would need to be `static`:
544
+
545
+ - when `@EnabledIf` or `@DisabledIf` is used at class level
546
+ - when `@EnabledIf` or `@DisabledIf` is used on a `@ParameterizedTest` or a
547
+ `@TestTemplate` method
548
+ - when the condition method is located in an external class
549
+
543
550
In any other case, you can use either static methods or instance methods as condition
544
551
methods.
552
+ ====
545
553
546
554
[TIP]
547
555
====
You can’t perform that action at this time.
0 commit comments