File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
src/test/java/org/openrewrite/java/migrate/jakarta Expand file tree Collapse file tree 1 file changed +32
-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,35 @@ public class TestApplication {
610611 )
611612 );
612613 }
614+
615+ @ Test
616+ void shouldRefactorSpringBeanXml () {
617+ rewriteRun (
618+ //language=XML
619+ xml (
620+ """
621+ <?xml version="1.0" encoding="UTF-8"?>
622+ <beans xmlns="http://www.springframework.org/schema/beans"
623+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
624+ <bean id="exampleBean" class="org.springframework.beans.ExampleBean">
625+ <property name="conFactory">
626+ <value>javax.jms.ConnectionFactory</value>
627+ </property>
628+ </bean>
629+ </beans>
630+ """ ,
631+ """
632+ <?xml version="1.0" encoding="UTF-8"?>
633+ <beans xmlns="http://www.springframework.org/schema/beans"
634+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
635+ <bean id="exampleBean" class="org.springframework.beans.ExampleBean">
636+ <property name="conFactory">
637+ <value>jakarta.jms.ConnectionFactory</value>
638+ </property>
639+ </bean>
640+ </beans>
641+ """
642+ )
643+ );
644+ }
613645}
You can’t perform that action at this time.
0 commit comments