Skip to content

Commit

Permalink
refact: Test Actor, Asserter Parameter Type
Browse files Browse the repository at this point in the history
  • Loading branch information
K-Diger committed Jul 29, 2024
1 parent 674299d commit b64cfbf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ abstract class AcceptanceTestHelper(
private val acceptanceTestActor: AcceptanceTestActor,
private val acceptanceTestAsserter: AcceptanceTestAsserter,
) {
fun act(
fun <T> act(
method: HttpMethod,
uri: String,
requestBody: Any?,
requestBody: T?,
parameters: Map<String, String> = emptyMap(),
): ResultActions {
return acceptanceTestActor.execute(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import org.springframework.http.HttpMethod
import org.springframework.test.web.servlet.ResultActions

interface AcceptanceTestActor {
fun execute(
fun <T> execute(
method: HttpMethod,
uri: String,
requestBody: Any?,
requestBody: T?,
parameters: Map<String, String>,
): ResultActions
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ class MockMvcActor(
private val objectMapper: ObjectMapper,
private val mockMvc: MockMvc,
) : AcceptanceTestActor {
override fun execute(
override fun <T> execute(
method: HttpMethod,
uri: String,
requestBody: Any?,
requestBody: T?,
parameters: Map<String, String>,
): ResultActions {
val requestBuilder = createRequestBuilder(method, uri)
Expand Down

0 comments on commit b64cfbf

Please sign in to comment.