fixing(gradle)

This commit is contained in:
2025-08-28 21:07:20 +02:00
parent 2c2dcd381c
commit 20788bde91
19 changed files with 495 additions and 333 deletions
@@ -1,21 +1,28 @@
package at.mocode.temp.pingservice
import io.mockk.mockk
import org.junit.jupiter.api.Test
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest
import org.springframework.boot.test.mock.mockito.MockBean
import org.springframework.boot.test.context.TestConfiguration
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Import
import org.springframework.test.web.servlet.MockMvc
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get
import org.springframework.test.web.servlet.result.MockMvcResultMatchers.*
@WebMvcTest(PingController::class)
@Import(PingControllerTest.TestConfig::class)
class PingControllerTest {
@Autowired
private lateinit var mockMvc: MockMvc
@MockBean
private lateinit var pingServiceCircuitBreaker: PingServiceCircuitBreaker
@TestConfiguration
class TestConfig {
@Bean
fun pingServiceCircuitBreaker(): PingServiceCircuitBreaker = mockk()
}
@Test
fun `ping endpoint should return pong status`() {