Skip to content

Commit cfa1b33

Browse files
authored
Add test case for SpringBatchTest (#224)
1 parent 27aad26 commit cfa1b33

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ dependencies {
247247
"testWithSpringBoot_2_4RuntimeOnly"("org.springframework.boot:spring-boot-test:2.4.+")
248248
"testWithSpringBoot_2_4RuntimeOnly"("org.springframework.boot:spring-boot-test-autoconfigure:2.4.+")
249249
"testWithSpringBoot_2_4RuntimeOnly"("org.apache.tomcat.embed:tomcat-embed-core:9.0.+")
250+
"testWithSpringBoot_2_4RuntimeOnly"("org.springframework.batch:spring-batch-test:4.3.+")
250251

251252
"testWithSpringFramework_5_1RuntimeOnly"("org.springframework:spring-core:5.1.+")
252253

src/testWithSpringBoot_2_4/kotlin/org/openrewrite/java/spring/boot2/UnnecessarySpringExtensionTest.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import org.openrewrite.java.JavaRecipeTest
2626
class UnnecessarySpringExtensionTest : JavaRecipeTest {
2727
override val parser: JavaParser
2828
get() = JavaParser.fromJavaVersion()
29-
.classpath("spring-context", "spring-test", "spring-boot-test", "junit-jupiter-api", "spring-boot-test-autoconfigure")
29+
.classpath("spring-context", "spring-test", "spring-boot-test", "junit-jupiter-api", "spring-boot-test-autoconfigure", "spring-batch-test")
3030
.build()
3131

3232
override val recipe: Recipe
@@ -71,7 +71,8 @@ class UnnecessarySpringExtensionTest : JavaRecipeTest {
7171
"org.springframework.boot.test.autoconfigure.data.mongo.DataMongoTest",
7272
"org.springframework.boot.test.autoconfigure.data.neo4j.DataNeo4jTest",
7373
"org.springframework.boot.test.autoconfigure.data.r2dbc.DataR2dbcTest",
74-
"org.springframework.boot.test.autoconfigure.data.redis.DataRedisTest"])
74+
"org.springframework.boot.test.autoconfigure.data.redis.DataRedisTest",
75+
"org.springframework.batch.test.context.SpringBatchTest"])
7576
fun removeSpringExtensionForTestSliceAnnotations(annotationName: String) = assertChanged(
7677
before = """
7778
import org.junit.jupiter.api.extension.ExtendWith;

0 commit comments

Comments
 (0)