15
15
*/
16
16
package org .openrewrite .java .migrate .jakarta ;
17
17
18
- import org .junit .jupiter .api .Disabled ;
19
18
import org .junit .jupiter .api .Nested ;
20
19
import org .junit .jupiter .api .Test ;
20
+ import org .openrewrite .DocumentExample ;
21
+ import org .openrewrite .Issue ;
21
22
import org .openrewrite .test .RecipeSpec ;
22
23
import org .openrewrite .test .RewriteTest ;
23
24
@@ -35,84 +36,102 @@ void noMigrate() {
35
36
xml (
36
37
//language=xml
37
38
"""
38
- <?xml version="1.0" encoding="UTF-8"?>
39
- <jxb:bindings version="3.0"
40
- xmlns:jxb="https://jakarta.ee/xml/ns/jaxb"
41
- xmlns:xs="http://www.w3.org/2001/XMLSchema">
42
- </jxb:bindings>
39
+ <?xml version="1.0" encoding="UTF-8"?>
40
+ <jxb:bindings version="3.0"
41
+ xmlns:jxb="https://jakarta.ee/xml/ns/jaxb"
42
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
43
+ </jxb:bindings>
44
+ """
45
+ )
46
+ );
47
+ }
48
+
49
+ @ Test
50
+ @ Issue ("https://github.com/openrewrite/rewrite-migrate-java/pull/741" )
51
+ void noMigrateIBMFiles () {
52
+ rewriteRun (
53
+ //language=xml
54
+ xml (
43
55
"""
56
+ <?xml version="1.0" encoding="UTF-8"?>
57
+ <jxb:bindings version="1.0"
58
+ xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
59
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
60
+ xmlns:ibm="http://websphere.ibm.com/xml/ns/javaee">
61
+ </jxb:bindings>
62
+ """
44
63
)
45
64
);
46
65
}
47
66
48
67
@ Nested
49
68
class Migrate {
50
- @ Disabled // temporarily disabling this to make the project build as we need a release.
69
+
51
70
@ Test
52
- void version () {
71
+ @ DocumentExample
72
+ void both () {
53
73
rewriteRun (
54
74
//language=xml
55
75
xml (
56
76
"""
57
- <?xml version="1.0" encoding="UTF-8"?>
58
- <jxb:bindings version="1.0"
59
- xmlns:jxb="https://jakarta.ee/xml/ns/jaxb"
60
- xmlns:xs="http://www.w3.org/2001/XMLSchema">
61
- </jxb:bindings>
62
- """ ,
63
- """
64
- <?xml version="1.0" encoding="UTF-8"?>
65
- <jxb:bindings version="3.0"
66
- xmlns:jxb="https://jakarta.ee/xml/ns/jaxb"
67
- xmlns:xs="http://www.w3.org/2001/XMLSchema">
68
- </jxb:bindings>
77
+ <?xml version="1.0" encoding="UTF-8"?>
78
+ <jxb:bindings version="1.0"
79
+ xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
80
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
81
+ </jxb:bindings>
82
+ """ ,
69
83
"""
84
+ <?xml version="1.0" encoding="UTF-8"?>
85
+ <jxb:bindings version="3.0"
86
+ xmlns:jxb="https://jakarta.ee/xml/ns/jaxb"
87
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
88
+ </jxb:bindings>
89
+ """
70
90
)
71
91
);
72
92
}
73
-
74
93
@ Test
75
- void namespace () {
94
+ void version () {
76
95
rewriteRun (
77
96
//language=xml
78
97
xml (
79
98
"""
80
- <?xml version="1.0" encoding="UTF-8"?>
81
- <jxb:bindings version="3.0"
82
- xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
83
- xmlns:xs="http://www.w3.org/2001/XMLSchema">
84
- </jxb:bindings>
85
- """ ,
86
- """
87
- <?xml version="1.0" encoding="UTF-8"?>
88
- <jxb:bindings version="3.0"
89
- xmlns:jxb="https://jakarta.ee/xml/ns/jaxb"
90
- xmlns:xs="http://www.w3.org/2001/XMLSchema">
91
- </jxb:bindings>
99
+ <?xml version="1.0" encoding="UTF-8"?>
100
+ <jxb:bindings version="1.0"
101
+ xmlns:jxb="https://jakarta.ee/xml/ns/jaxb"
102
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
103
+ </jxb:bindings>
104
+ """ ,
92
105
"""
106
+ <?xml version="1.0" encoding="UTF-8"?>
107
+ <jxb:bindings version="3.0"
108
+ xmlns:jxb="https://jakarta.ee/xml/ns/jaxb"
109
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
110
+ </jxb:bindings>
111
+ """
93
112
)
94
113
);
95
114
}
96
115
97
116
@ Test
98
- void both () {
117
+ void namespace () {
99
118
rewriteRun (
100
119
//language=xml
101
120
xml (
102
121
"""
103
- <?xml version="1.0" encoding="UTF-8"?>
104
- <jxb:bindings version="1.0"
105
- xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
106
- xmlns:xs="http://www.w3.org/2001/XMLSchema">
107
- </jxb:bindings>
108
- """ ,
109
- """
110
- <?xml version="1.0" encoding="UTF-8"?>
111
- <jxb:bindings version="3.0"
112
- xmlns:jxb="https://jakarta.ee/xml/ns/jaxb"
113
- xmlns:xs="http://www.w3.org/2001/XMLSchema">
114
- </jxb:bindings>
122
+ <?xml version="1.0" encoding="UTF-8"?>
123
+ <jxb:bindings version="3.0"
124
+ xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
125
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
126
+ </jxb:bindings>
127
+ """ ,
115
128
"""
129
+ <?xml version="1.0" encoding="UTF-8"?>
130
+ <jxb:bindings version="3.0"
131
+ xmlns:jxb="https://jakarta.ee/xml/ns/jaxb"
132
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
133
+ </jxb:bindings>
134
+ """
116
135
)
117
136
);
118
137
}
0 commit comments