Skip to content

Commit

Permalink
Add test case for SpringBatchTest (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
shanman190 authored Oct 14, 2022
1 parent 27aad26 commit cfa1b33
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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.+")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit cfa1b33

Please sign in to comment.