diff --git a/src/testWithSpringBoot_2_4/kotlin/org/openrewrite/java/spring/SeparateApplicationYamlByProfileTest.kt b/src/testWithSpringBoot_2_4/kotlin/org/openrewrite/java/spring/SeparateApplicationYamlByProfileTest.kt index 0361021e9..5dfba709f 100644 --- a/src/testWithSpringBoot_2_4/kotlin/org/openrewrite/java/spring/SeparateApplicationYamlByProfileTest.kt +++ b/src/testWithSpringBoot_2_4/kotlin/org/openrewrite/java/spring/SeparateApplicationYamlByProfileTest.kt @@ -37,7 +37,7 @@ class SeparateApplicationYamlByProfileTest : YamlRecipeTest { activate: on-profile: test name: test - """.trimIndent()).map { it.withSourcePath(Paths.get("src/main/resources/application.yml")) }).groupByProfile() + """.trimIndent()).map { it.withSourcePath(Paths.get("src/main/resources/application.yml")) }).results.groupByProfile() assertThat(results["application.yml"]).isEqualTo("name: main") assertThat(results["application-test.yml"]).isEqualTo("name: test") @@ -51,7 +51,7 @@ class SeparateApplicationYamlByProfileTest : YamlRecipeTest { activate: on-profile: test name: test - """.trimIndent()).map { it.withSourcePath(Paths.get("src/main/resources/application.yml")) }).groupByProfile() + """.trimIndent()).map { it.withSourcePath(Paths.get("src/main/resources/application.yml")) }).results.groupByProfile() assertThat(results["application.yml"]).isEqualTo(null) assertThat(results["application-test.yml"]).isEqualTo("name: test") @@ -65,7 +65,7 @@ class SeparateApplicationYamlByProfileTest : YamlRecipeTest { activate: on-profile: !test name: test - """.trimIndent())).isEmpty() + """.trimIndent())).results.isEmpty() } private fun List.groupByProfile() = associate { r -> diff --git a/src/testWithSpringBoot_2_4/kotlin/org/openrewrite/java/spring/boot2/MergeBootstrapYamlWithApplicationYamlTest.kt b/src/testWithSpringBoot_2_4/kotlin/org/openrewrite/java/spring/boot2/MergeBootstrapYamlWithApplicationYamlTest.kt index 78ece1099..c8ad6f7f5 100644 --- a/src/testWithSpringBoot_2_4/kotlin/org/openrewrite/java/spring/boot2/MergeBootstrapYamlWithApplicationYamlTest.kt +++ b/src/testWithSpringBoot_2_4/kotlin/org/openrewrite/java/spring/boot2/MergeBootstrapYamlWithApplicationYamlTest.kt @@ -55,7 +55,7 @@ class MergeBootstrapYamlWithApplicationYamlTest : YamlRecipeTest { ).map { it.withSourcePath(Paths.get("src/main/resources/bootstrap.yml")) } val results = recipe.run(bootstrapYaml + applicationYaml) - .sortedBy { it.before!!.sourcePath.fileName.toString() } + .results.sortedBy { it.before!!.sourcePath.fileName.toString() } assertThat(results).hasSize(2) assertThat(results[1].after).isNull() diff --git a/src/testWithSpringFramework_5_3/kotlin/org/openrewrite/java/spring/UpdateApiManifestTest.kt b/src/testWithSpringFramework_5_3/kotlin/org/openrewrite/java/spring/UpdateApiManifestTest.kt index 23ad544ff..2b9e85266 100644 --- a/src/testWithSpringFramework_5_3/kotlin/org/openrewrite/java/spring/UpdateApiManifestTest.kt +++ b/src/testWithSpringFramework_5_3/kotlin/org/openrewrite/java/spring/UpdateApiManifestTest.kt @@ -34,7 +34,7 @@ class UpdateApiManifestTest : JavaRecipeTest { @Test fun requestMappingWithMethod() { - val results = recipe.run(parser.parse(""" + val recipeRun = recipe.run(parser.parse(""" import java.util.List; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; @@ -49,8 +49,8 @@ class UpdateApiManifestTest : JavaRecipeTest { } """.trimIndent())) - assertThat(results.size).isEqualTo(1) - assertThat(results[0].after!!.sourcePath).isEqualTo(Paths.get("META-INF/api-manifest.txt")) - assertThat(results[0].after!!.printAll()).isEqualTo("POST /users/post") + assertThat(recipeRun.results.size).isEqualTo(1) + assertThat(recipeRun.results[0].after!!.sourcePath).isEqualTo(Paths.get("META-INF/api-manifest.txt")) + assertThat(recipeRun.results[0].after!!.printAll()).isEqualTo("POST /users/post") } }