From c972f026c2050200df073c86d656e878ef1c98a3 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Mon, 9 Dec 2024 19:26:32 +0100 Subject: [PATCH] Add missing Gradle dependencies --- .../micronaut/UpdateMicronautSessionTest.java | 38 ++++++++++++++----- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/src/test/java/org/openrewrite/java/micronaut/UpdateMicronautSessionTest.java b/src/test/java/org/openrewrite/java/micronaut/UpdateMicronautSessionTest.java index 702bc58..b0224fe 100644 --- a/src/test/java/org/openrewrite/java/micronaut/UpdateMicronautSessionTest.java +++ b/src/test/java/org/openrewrite/java/micronaut/UpdateMicronautSessionTest.java @@ -35,24 +35,38 @@ public void defaults(RecipeSpec spec) { @Test void updateGradleDependencies() { - rewriteRun(mavenProject("project", - //language=groovy - buildGradle(""" + rewriteRun( + mavenProject("project", + //language=groovy + buildGradle( + """ dependencies { implementation("io.micronaut:micronaut-session") } - """, """ + repositories { + mavenCentral() + } + """, + """ dependencies { implementation("io.micronaut.session:micronaut-session") } - """))); + repositories { + mavenCentral() + } + """ + ) + ) + ); } @Test void updateMavenDependencies() { - rewriteRun(mavenProject("project", - //language=xml - pomXml(""" + rewriteRun( + mavenProject("project", + //language=xml + pomXml( + """ com.mycompany.app my-app @@ -69,7 +83,8 @@ void updateMavenDependencies() { - """.formatted(MicronautRewriteTestVersions.getLatestMN3Version()), """ + """.formatted(MicronautRewriteTestVersions.getLatestMN3Version()), + """ com.mycompany.app my-app @@ -95,6 +110,9 @@ void updateMavenDependencies() { - """.formatted(latestMicronautVersion)))); + """.formatted(latestMicronautVersion) + ) + ) + ); } }