13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
- package org .openrewrite .java .migrate .jakarta ;
16
+ package org .openrewrite .java .migrate .jakarta ;
17
17
18
18
import org .intellij .lang .annotations .Language ;
19
19
import org .junit .jupiter .api .Test ;
20
-
21
20
import org .openrewrite .DocumentExample ;
22
21
import org .openrewrite .config .Environment ;
23
22
import org .openrewrite .java .JavaParser ;
24
23
import org .openrewrite .test .RecipeSpec ;
25
24
import org .openrewrite .test .RewriteTest ;
26
25
27
- import static org .openrewrite .java .Assertions .* ;
26
+ import static org .openrewrite .java .Assertions .java ;
28
27
29
- public class JavaxTransactionMigrationToJakartaTransactionTest implements RewriteTest {
28
+ class JavaxTransactionMigrationToJakartaTransactionTest implements RewriteTest {
30
29
@ Language ("java" )
31
30
private static final String javax_transaction =
32
31
"""
@@ -67,12 +66,13 @@ void doNotChangeImportWhenPackageFromJavaSE() {
67
66
spec -> spec .parser (JavaParser .fromJavaVersion ().dependsOn (javax_transaction_xa )),
68
67
//language=java
69
68
java (
70
- """
71
- import javax.transaction.xa.*;
72
- public class A {
73
- XAResource xa;
74
- }
75
- """ )
69
+ """
70
+ import javax.transaction.xa.*;
71
+ public class A {
72
+ XAResource xa;
73
+ }
74
+ """
75
+ )
76
76
);
77
77
}
78
78
@@ -83,7 +83,7 @@ void changeImportWhenPackageFromJakartaTransaction() {
83
83
spec -> spec .parser (JavaParser .fromJavaVersion ().dependsOn (javax_transaction , jakarta_transaction )),
84
84
//language=java
85
85
java (
86
- """
86
+ """
87
87
import javax.transaction.Transactional;
88
88
@Transactional
89
89
public class A {
@@ -96,7 +96,8 @@ public void foo() {}
96
96
public class A {
97
97
public void foo() {}
98
98
}
99
- """ )
99
+ """
100
+ )
100
101
);
101
102
}
102
103
}
0 commit comments