Skip to content

Commit 2d138e5

Browse files
committed
Relocate @EnabledIf & @DisabledIf to condition package
1 parent 2dc55df commit 2d138e5

File tree

23 files changed

+52
-46
lines changed

23 files changed

+52
-46
lines changed

documentation/src/docs/asciidoc/link-attributes.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@
3535
:BeforeEachCallback: {javadoc-root}/org/junit/jupiter/api/extension/BeforeEachCallback.html[BeforeEachCallback]
3636
:BeforeTestExecutionCallback: {javadoc-root}/org/junit/jupiter/api/extension/BeforeTestExecutionCallback.html[BeforeTestExecutionCallback]
3737
:Disabled: {javadoc-root}/org/junit/jupiter/api/Disabled.html[@Disabled]
38-
:DisabledIf: {javadoc-root}/org/junit/jupiter/api/DisabledIf.html[@DisabledIf]
38+
:DisabledIf: {javadoc-root}/org/junit/jupiter/api/condition/DisabledIf.html[@DisabledIf]
3939
:DisabledIfEnvironmentVariable: {javadoc-root}/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariable.html[@DisabledIfEnvironmentVariable]
4040
:DisabledIfSystemProperty: {javadoc-root}/org/junit/jupiter/api/condition/DisabledIfSystemProperty.html[@DisabledIfSystemProperty]
4141
:DisabledOnJre: {javadoc-root}/org/junit/jupiter/api/condition/DisabledOnJre.html[@DisabledOnJre]
4242
:DisabledOnOs: {javadoc-root}/org/junit/jupiter/api/condition/DisabledOnOs.html[@DisabledOnOs]
43-
:EnabledIf: {javadoc-root}/org/junit/jupiter/api/EnabledIf.html[@EnabledIf]
43+
:EnabledIf: {javadoc-root}/org/junit/jupiter/api/condition/EnabledIf.html[@EnabledIf]
4444
:EnabledIfEnvironmentVariable: {javadoc-root}/org/junit/jupiter/api/condition/EnabledIfEnvironmentVariable.html[@EnabledIfEnvironmentVariable]
4545
:EnabledIfSystemProperty: {javadoc-root}/org/junit/jupiter/api/condition/EnabledIfSystemProperty.html[@EnabledIfSystemProperty]
4646
:EnabledOnJre: {javadoc-root}/org/junit/jupiter/api/condition/EnabledOnJre.html[@EnabledOnJre]

documentation/src/docs/asciidoc/release-notes/release-notes-5.1.0-RC1.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ on GitHub.
3535

3636
==== Deprecations and Breaking Changes
3737

38-
* ❓
38+
* The `@EnabledIf` annotation introduced in 5.1 M2 has been moved to the
39+
`org.junit.jupiter.api.condition` package.
3940

4041
==== New Features and Improvements
4142

documentation/src/docs/asciidoc/user-guide/api-evolution.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@ The following table lists which APIs are currently designated as _experimental_
4747
| Package Name | Class Name | Type
4848

4949
| `org.junit.jupiter.api` | `AssertionsKt` | `class`
50-
| `org.junit.jupiter.api` | `DisabledIf` | `annotation`
5150
| `org.junit.jupiter.api` | `DynamicContainer` | `class`
5251
| `org.junit.jupiter.api` | `DynamicNode` | `class`
5352
| `org.junit.jupiter.api` | `DynamicTest` | `class`
54-
| `org.junit.jupiter.api` | `EnabledIf` | `annotation`
5553
| `org.junit.jupiter.api` | `TestFactory` | `annotation`
54+
| `org.junit.jupiter.api.condition` | `DisabledIf` | `annotation`
55+
| `org.junit.jupiter.api.condition` | `EnabledIf` | `annotation`
56+
| `org.junit.jupiter.api.extension` | `ScriptEvaluationException` | `class`
5657
| `org.junit.jupiter.migrationsupport.rules` | `EnableRuleMigrationSupport` | `annotation`
5758
| `org.junit.jupiter.migrationsupport.rules` | `ExpectedExceptionSupport` | `class`
5859
| `org.junit.jupiter.migrationsupport.rules` | `ExternalResourceSupport` | `class`

documentation/src/test/java/example/ConditionalTestExecutionDemo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
import java.lang.annotation.Target;
2626
import java.time.LocalDate;
2727

28-
import org.junit.jupiter.api.DisabledIf;
29-
import org.junit.jupiter.api.EnabledIf;
3028
import org.junit.jupiter.api.RepeatedTest;
3129
import org.junit.jupiter.api.Test;
30+
import org.junit.jupiter.api.condition.DisabledIf;
3231
import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable;
3332
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
3433
import org.junit.jupiter.api.condition.DisabledOnJre;
3534
import org.junit.jupiter.api.condition.DisabledOnOs;
35+
import org.junit.jupiter.api.condition.EnabledIf;
3636
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
3737
import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
3838
import org.junit.jupiter.api.condition.EnabledOnJre;

junit-jupiter-api/src/main/java/org/junit/jupiter/api/Disabled.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
* are automatically disabled as well.
2929
*
3030
* @since 5.0
31-
* @see EnabledIf
31+
* @see org.junit.jupiter.api.condition.EnabledIf
32+
* @see org.junit.jupiter.api.condition.DisabledIf
3233
*/
3334
@Target({ ElementType.TYPE, ElementType.METHOD })
3435
@Retention(RetentionPolicy.RUNTIME)

junit-jupiter-api/src/main/java/org/junit/jupiter/api/DisabledIf.java renamed to junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIf.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* http://www.eclipse.org/legal/epl-v20.html
99
*/
1010

11-
package org.junit.jupiter.api;
11+
package org.junit.jupiter.api.condition;
1212

1313
import static org.apiguardian.api.API.Status.EXPERIMENTAL;
1414

@@ -96,8 +96,8 @@
9696
* They might clash with new bindings introduced in the future.
9797
*
9898
* @since 5.1
99-
* @see Disabled
100-
* @see EnabledIf
99+
* @see org.junit.jupiter.api.Disabled
100+
* @see org.junit.jupiter.api.condition.EnabledIf
101101
* @see javax.script.ScriptEngine
102102
* @see org.junit.jupiter.api.extension.ExecutionCondition
103103
* @see org.junit.jupiter.api.extension.ConditionEvaluationResult#enabled(String)

junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariable.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
* @since 5.1
3838
* @see EnabledIfEnvironmentVariable
3939
* @see org.junit.jupiter.api.Disabled
40-
* @see org.junit.jupiter.api.EnabledIf
41-
* @see org.junit.jupiter.api.DisabledIf
40+
* @see org.junit.jupiter.api.condition.EnabledIf
41+
* @see org.junit.jupiter.api.condition.DisabledIf
4242
*/
4343
@Target({ ElementType.TYPE, ElementType.METHOD })
4444
@Retention(RetentionPolicy.RUNTIME)

junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfSystemProperty.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
* @since 5.1
3838
* @see EnabledIfSystemProperty
3939
* @see org.junit.jupiter.api.Disabled
40-
* @see org.junit.jupiter.api.EnabledIf
41-
* @see org.junit.jupiter.api.DisabledIf
40+
* @see org.junit.jupiter.api.condition.EnabledIf
41+
* @see org.junit.jupiter.api.condition.DisabledIf
4242
*/
4343
@Target({ ElementType.TYPE, ElementType.METHOD })
4444
@Retention(RetentionPolicy.RUNTIME)

junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledOnJre.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
* @since 5.1
3333
* @see EnabledOnJre
3434
* @see org.junit.jupiter.api.Disabled
35-
* @see org.junit.jupiter.api.EnabledIf
36-
* @see org.junit.jupiter.api.DisabledIf
35+
* @see org.junit.jupiter.api.condition.EnabledIf
36+
* @see org.junit.jupiter.api.condition.DisabledIf
3737
*/
3838
@Target({ ElementType.TYPE, ElementType.METHOD })
3939
@Retention(RetentionPolicy.RUNTIME)

junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledOnOs.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
* @since 5.1
3333
* @see EnabledOnOs
3434
* @see org.junit.jupiter.api.Disabled
35-
* @see org.junit.jupiter.api.EnabledIf
36-
* @see org.junit.jupiter.api.DisabledIf
35+
* @see org.junit.jupiter.api.condition.EnabledIf
36+
* @see org.junit.jupiter.api.condition.DisabledIf
3737
*/
3838
@Target({ ElementType.TYPE, ElementType.METHOD })
3939
@Retention(RetentionPolicy.RUNTIME)

0 commit comments

Comments
 (0)