Improve documentation for @EnabledIf and @DisabledIf test support
Closes gh-28157
This commit is contained in:
@@ -1960,6 +1960,19 @@ example, you can create a custom `@EnabledOnMac` annotation as follows:
|
||||
annotation class EnabledOnMac {}
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
`@EnabledOnMac` is meant only as an example of what is possible. If you have that exact
|
||||
use case, please use the built-in `@EnabledOnOs(MAC)` support in JUnit Jupiter.
|
||||
====
|
||||
|
||||
[WARNING]
|
||||
====
|
||||
Since JUnit 5.7, JUnit Jupiter also has a condition annotation named `@EnabledIf`. Thus,
|
||||
if you wish to use Spring's `@EnabledIf` support make sure you import the annotation type
|
||||
from the correct package.
|
||||
====
|
||||
|
||||
[[integration-testing-annotations-junit-jupiter-disabledif]]
|
||||
===== `@DisabledIf`
|
||||
|
||||
@@ -2008,6 +2021,19 @@ example, you can create a custom `@DisabledOnMac` annotation as follows:
|
||||
annotation class DisabledOnMac {}
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
`@DisabledOnMac` is meant only as an example of what is possible. If you have that exact
|
||||
use case, please use the built-in `@DisabledOnOs(MAC)` support in JUnit Jupiter.
|
||||
====
|
||||
|
||||
[WARNING]
|
||||
====
|
||||
Since JUnit 5.7, JUnit Jupiter also has a condition annotation named `@DisabledIf`. Thus,
|
||||
if you wish to use Spring's `@DisabledIf` support make sure you import the annotation type
|
||||
from the correct package.
|
||||
====
|
||||
|
||||
[[integration-testing-annotations-meta]]
|
||||
==== Meta-Annotation Support for Testing
|
||||
|
||||
|
||||
Reference in New Issue
Block a user