generated from pricelees/issue-pr-template
Compare commits
3 Commits
7d37afbba1
...
74ebf9b841
| Author | SHA1 | Date | |
|---|---|---|---|
| 74ebf9b841 | |||
| 8bb2879a40 | |||
| f2639c4779 |
@ -11,7 +11,7 @@ class DemoService(
|
|||||||
|
|
||||||
fun doSomething(request: SolutionForPrimitive) {
|
fun doSomething(request: SolutionForPrimitive) {
|
||||||
log.info { "solution for primitive requests: $request" }
|
log.info { "solution for primitive requests: $request" }
|
||||||
log.info { "value: ${request.value!!}" }
|
request.value?.let { log.info { "value: ${request.value}" } }
|
||||||
}
|
}
|
||||||
|
|
||||||
fun doSomething(request: WrapperRequest) {
|
fun doSomething(request: WrapperRequest) {
|
||||||
|
|||||||
@ -21,7 +21,7 @@ import org.springframework.test.web.servlet.result.MockMvcResultMatchers.status
|
|||||||
class DemoControllerTest {
|
class DemoControllerTest {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private val mockMvc: MockMvc? = null
|
private lateinit var mockMvc: MockMvc
|
||||||
|
|
||||||
@DisplayName("Wrapper 타입인 경우 값이 입력되지 않으면 HttpMessageNotReadableException이 발생한다.")
|
@DisplayName("Wrapper 타입인 경우 값이 입력되지 않으면 HttpMessageNotReadableException이 발생한다.")
|
||||||
@ParameterizedTest(name = "{0}")
|
@ParameterizedTest(name = "{0}")
|
||||||
@ -76,7 +76,7 @@ class DemoControllerTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun run(endpoint: String, body: String, expectedStatus: Int): ResultActions = mockMvc!!
|
private fun run(endpoint: String, body: String, expectedStatus: Int): ResultActions = mockMvc
|
||||||
.perform(
|
.perform(
|
||||||
post(endpoint)
|
post(endpoint)
|
||||||
.contentType(MediaType.APPLICATION_JSON_VALUE)
|
.contentType(MediaType.APPLICATION_JSON_VALUE)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user