File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
src/test/java/org/openrewrite/java/migrate/jakarta Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 2525
2626import static org .openrewrite .java .Assertions .*;
2727import static org .openrewrite .maven .Assertions .pomXml ;
28+ import static org .openrewrite .xml .Assertions .xml ;
2829
2930class JavaxToJakartaTest implements RewriteTest {
3031
@@ -610,4 +611,36 @@ public class TestApplication {
610611 )
611612 );
612613 }
614+
615+ @ Test
616+ void shouldRefactorSpringBeanXml () {
617+ //language=java
618+ rewriteRun (
619+ //language=XML
620+ xml (
621+ """
622+ <?xml version="1.0" encoding="UTF-8"?>
623+ <beans xmlns="http://www.springframework.org/schema/beans"
624+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
625+ <bean id="exampleBean" class="org.springframework.beans.ExampleBean">
626+ <property name="conFactory">
627+ <value>javax.jms.ConnectionFactory</value>
628+ </property>
629+ </bean>
630+ </beans>
631+ """ ,
632+ """
633+ <?xml version="1.0" encoding="UTF-8"?>
634+ <beans xmlns="http://www.springframework.org/schema/beans"
635+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
636+ <bean id="exampleBean" class="org.springframework.beans.ExampleBean">
637+ <property name="conFactory">
638+ <value>jakarta.jms.ConnectionFactory</value>
639+ </property>
640+ </bean>
641+ </beans>
642+ """
643+ )
644+ );
645+ }
613646}
You can’t perform that action at this time.
0 commit comments