diff --git a/build.gradle.kts b/build.gradle.kts index a0d21b4..1da94a7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - id("org.springframework.boot") version "3.5.7" + id("org.springframework.boot") version "4.0.0" id("io.spring.dependency-management") version "1.1.7" val kotlinVersion = "2.2.21" kotlin("jvm") version kotlinVersion @@ -26,6 +26,7 @@ dependencies { implementation("org.jetbrains.kotlin:kotlin-reflect") implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") testImplementation("org.springframework.boot:spring-boot-starter-test") + testImplementation("org.springframework.boot:spring-boot-starter-webmvc-test") } tasks.withType { diff --git a/src/test/kotlin/com/yonatankarp/greeting/GreetingApiControllerTest.kt b/src/test/kotlin/com/yonatankarp/greeting/GreetingApiControllerTest.kt index a9b665c..70bf5a7 100644 --- a/src/test/kotlin/com/yonatankarp/greeting/GreetingApiControllerTest.kt +++ b/src/test/kotlin/com/yonatankarp/greeting/GreetingApiControllerTest.kt @@ -6,10 +6,9 @@ import org.junit.jupiter.api.TestInstance import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.Arguments import org.junit.jupiter.params.provider.MethodSource -import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc import org.springframework.boot.test.context.SpringBootTest +import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc import org.springframework.http.MediaType -import org.springframework.test.context.web.WebAppConfiguration import org.springframework.test.web.servlet.request.MockMvcRequestBuilders import org.springframework.test.web.servlet.result.MockMvcResultMatchers import org.springframework.test.web.servlet.setup.MockMvcBuilders @@ -18,7 +17,6 @@ import org.springframework.web.context.WebApplicationContext @TestInstance(TestInstance.Lifecycle.PER_CLASS) @SpringBootTest @AutoConfigureMockMvc -@WebAppConfiguration class GreetingApiControllerTest( context: WebApplicationContext, ) {