diff --git a/build.gradle.kts b/build.gradle.kts index df83531e0..2e87a9581 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -247,6 +247,7 @@ dependencies { "testWithSpringBoot_2_4RuntimeOnly"("org.springframework.boot:spring-boot-test:2.4.+") "testWithSpringBoot_2_4RuntimeOnly"("org.springframework.boot:spring-boot-test-autoconfigure:2.4.+") "testWithSpringBoot_2_4RuntimeOnly"("org.apache.tomcat.embed:tomcat-embed-core:9.0.+") + "testWithSpringBoot_2_4RuntimeOnly"("org.springframework.batch:spring-batch-test:4.3.+") "testWithSpringFramework_5_1RuntimeOnly"("org.springframework:spring-core:5.1.+") diff --git a/src/testWithSpringBoot_2_4/kotlin/org/openrewrite/java/spring/boot2/UnnecessarySpringExtensionTest.kt b/src/testWithSpringBoot_2_4/kotlin/org/openrewrite/java/spring/boot2/UnnecessarySpringExtensionTest.kt index 0044e16a3..9011a4cc5 100644 --- a/src/testWithSpringBoot_2_4/kotlin/org/openrewrite/java/spring/boot2/UnnecessarySpringExtensionTest.kt +++ b/src/testWithSpringBoot_2_4/kotlin/org/openrewrite/java/spring/boot2/UnnecessarySpringExtensionTest.kt @@ -26,7 +26,7 @@ import org.openrewrite.java.JavaRecipeTest class UnnecessarySpringExtensionTest : JavaRecipeTest { override val parser: JavaParser get() = JavaParser.fromJavaVersion() - .classpath("spring-context", "spring-test", "spring-boot-test", "junit-jupiter-api", "spring-boot-test-autoconfigure") + .classpath("spring-context", "spring-test", "spring-boot-test", "junit-jupiter-api", "spring-boot-test-autoconfigure", "spring-batch-test") .build() override val recipe: Recipe @@ -71,7 +71,8 @@ class UnnecessarySpringExtensionTest : JavaRecipeTest { "org.springframework.boot.test.autoconfigure.data.mongo.DataMongoTest", "org.springframework.boot.test.autoconfigure.data.neo4j.DataNeo4jTest", "org.springframework.boot.test.autoconfigure.data.r2dbc.DataR2dbcTest", - "org.springframework.boot.test.autoconfigure.data.redis.DataRedisTest"]) + "org.springframework.boot.test.autoconfigure.data.redis.DataRedisTest", + "org.springframework.batch.test.context.SpringBatchTest"]) fun removeSpringExtensionForTestSliceAnnotations(annotationName: String) = assertChanged( before = """ import org.junit.jupiter.api.extension.ExtendWith;