From 2ff26bcc2ca0ab9328255f2ce0f5d965512c9d3c Mon Sep 17 00:00:00 2001 From: Laurens Westerlaken Date: Thu, 14 Nov 2024 15:26:24 +0100 Subject: [PATCH] Proof that `javax.jms` is migrated to `jakarta.jms` in spring.xml (#603) * This testcase should start working after ChangeType and ChangePackage adapt the new `SourceFileWithReference` construction * Apply suggestions from code review --------- Co-authored-by: Tim te Beek --- .../migrate/jakarta/JavaxToJakartaTest.java | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/test/java/org/openrewrite/java/migrate/jakarta/JavaxToJakartaTest.java b/src/test/java/org/openrewrite/java/migrate/jakarta/JavaxToJakartaTest.java index 9afbaa2e58..00016719b7 100644 --- a/src/test/java/org/openrewrite/java/migrate/jakarta/JavaxToJakartaTest.java +++ b/src/test/java/org/openrewrite/java/migrate/jakarta/JavaxToJakartaTest.java @@ -25,6 +25,7 @@ import static org.openrewrite.java.Assertions.*; import static org.openrewrite.maven.Assertions.pomXml; +import static org.openrewrite.xml.Assertions.xml; class JavaxToJakartaTest implements RewriteTest { @@ -610,4 +611,35 @@ public class TestApplication { ) ); } + + @Test + void shouldRefactorSpringBeanXml() { + rewriteRun( + //language=XML + xml( + """ + + + + + javax.jms.ConnectionFactory + + + + """, + """ + + + + + jakarta.jms.ConnectionFactory + + + + """ + ) + ); + } }