chore(backend): replace @Configuration with @TestConfiguration in test classes

- Adjusted annotations in `PingControllerIntegrationTest` and `PingControllerTest` to improve test context setup.
This commit is contained in:
2026-02-01 17:56:27 +01:00
parent 7401df11a6
commit d02e159887
2 changed files with 4 additions and 4 deletions
@@ -12,8 +12,8 @@ import org.junit.jupiter.api.Test
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.beans.factory.annotation.Qualifier
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest
import org.springframework.boot.test.context.TestConfiguration
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.context.annotation.Import
import org.springframework.context.annotation.Primary
import org.springframework.test.context.ActiveProfiles
@@ -42,7 +42,7 @@ class PingControllerIntegrationTest {
@Qualifier("pingUseCaseIntegrationMock")
private lateinit var pingUseCase: PingUseCase
@Configuration
@TestConfiguration
class PingControllerIntegrationTestConfig {
@Bean("pingUseCaseIntegrationMock")
@Primary
@@ -16,8 +16,8 @@ import org.springframework.beans.factory.annotation.Autowired
import org.springframework.beans.factory.annotation.Qualifier
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest
import org.springframework.boot.test.context.TestConfiguration
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.context.annotation.Import
import org.springframework.context.annotation.Primary
import org.springframework.test.context.ActiveProfiles
@@ -54,7 +54,7 @@ class PingControllerTest {
@Autowired
private lateinit var objectMapper: ObjectMapper
@Configuration
@TestConfiguration
class PingControllerTestConfig {
@Bean("pingUseCaseMock")
@Primary