From b64cfbf6b78460de7c679f3cb6d073662cd62af7 Mon Sep 17 00:00:00 2001 From: Diger Date: Mon, 29 Jul 2024 09:38:29 +0900 Subject: [PATCH] refact: Test Actor, Asserter Parameter Type --- .../test/kotlin/com/piikii/bootstrap/AcceptanceTestHelper.kt | 4 ++-- .../kotlin/com/piikii/bootstrap/actor/AcceptanceTestActor.kt | 4 ++-- .../test/kotlin/com/piikii/bootstrap/actor/MockMvcActor.kt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/piikii-bootstrap/src/test/kotlin/com/piikii/bootstrap/AcceptanceTestHelper.kt b/piikii-bootstrap/src/test/kotlin/com/piikii/bootstrap/AcceptanceTestHelper.kt index ff7d7b7e..5b52b8b4 100644 --- a/piikii-bootstrap/src/test/kotlin/com/piikii/bootstrap/AcceptanceTestHelper.kt +++ b/piikii-bootstrap/src/test/kotlin/com/piikii/bootstrap/AcceptanceTestHelper.kt @@ -13,10 +13,10 @@ abstract class AcceptanceTestHelper( private val acceptanceTestActor: AcceptanceTestActor, private val acceptanceTestAsserter: AcceptanceTestAsserter, ) { - fun act( + fun act( method: HttpMethod, uri: String, - requestBody: Any?, + requestBody: T?, parameters: Map = emptyMap(), ): ResultActions { return acceptanceTestActor.execute( diff --git a/piikii-bootstrap/src/test/kotlin/com/piikii/bootstrap/actor/AcceptanceTestActor.kt b/piikii-bootstrap/src/test/kotlin/com/piikii/bootstrap/actor/AcceptanceTestActor.kt index f540941e..58450546 100644 --- a/piikii-bootstrap/src/test/kotlin/com/piikii/bootstrap/actor/AcceptanceTestActor.kt +++ b/piikii-bootstrap/src/test/kotlin/com/piikii/bootstrap/actor/AcceptanceTestActor.kt @@ -4,10 +4,10 @@ import org.springframework.http.HttpMethod import org.springframework.test.web.servlet.ResultActions interface AcceptanceTestActor { - fun execute( + fun execute( method: HttpMethod, uri: String, - requestBody: Any?, + requestBody: T?, parameters: Map, ): ResultActions } diff --git a/piikii-bootstrap/src/test/kotlin/com/piikii/bootstrap/actor/MockMvcActor.kt b/piikii-bootstrap/src/test/kotlin/com/piikii/bootstrap/actor/MockMvcActor.kt index 44caa911..3e93d773 100644 --- a/piikii-bootstrap/src/test/kotlin/com/piikii/bootstrap/actor/MockMvcActor.kt +++ b/piikii-bootstrap/src/test/kotlin/com/piikii/bootstrap/actor/MockMvcActor.kt @@ -17,10 +17,10 @@ class MockMvcActor( private val objectMapper: ObjectMapper, private val mockMvc: MockMvc, ) : AcceptanceTestActor { - override fun execute( + override fun execute( method: HttpMethod, uri: String, - requestBody: Any?, + requestBody: T?, parameters: Map, ): ResultActions { val requestBuilder = createRequestBuilder(method, uri)