From 30c80ab7428080791b14b81236b5e1b1f990efe6 Mon Sep 17 00:00:00 2001 From: Hyeon-Uk Date: Sun, 11 Aug 2024 22:50:18 +0900 Subject: [PATCH] =?UTF-8?q?[chore]=20chaining=20method=EB=A5=BC=20?= =?UTF-8?q?=EB=B3=B4=EA=B8=B0=20=ED=8E=B8=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lab/web/api/PayAccountApiControllerTest.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/test/java/camp/woowak/lab/web/api/PayAccountApiControllerTest.java b/src/test/java/camp/woowak/lab/web/api/PayAccountApiControllerTest.java index 11aab8de..7afd231b 100644 --- a/src/test/java/camp/woowak/lab/web/api/PayAccountApiControllerTest.java +++ b/src/test/java/camp/woowak/lab/web/api/PayAccountApiControllerTest.java @@ -69,7 +69,8 @@ void successTest() throws Exception { PayAccountChargeRequest command = new PayAccountChargeRequest(amount); //when & then - mvc.perform(post(BASE_URL + payAccount.getId() + "/charge").contentType(MediaType.APPLICATION_JSON_VALUE) + mvc.perform(post(BASE_URL + payAccount.getId() + "/charge") + .contentType(MediaType.APPLICATION_JSON_VALUE) .content(objectMapper.writeValueAsBytes(command))) .andExpect(status().isOk()) .andExpect(jsonPath("$.balance").value(amount + originBalance)); @@ -87,7 +88,8 @@ void notExistsAccountIdTest() throws Exception { PayAccountChargeRequest command = new PayAccountChargeRequest(amount); //when & then - mvc.perform(post(BASE_URL + notExistsId + "/charge").contentType(MediaType.APPLICATION_JSON_VALUE) + mvc.perform(post(BASE_URL + notExistsId + "/charge") + .contentType(MediaType.APPLICATION_JSON_VALUE) .content(objectMapper.writeValueAsBytes(command))) .andExpect(status().isNotFound()); } @@ -99,7 +101,8 @@ void nullAmountTest() throws Exception { PayAccountChargeRequest command = new PayAccountChargeRequest(null); //when & then - mvc.perform(post(BASE_URL + payAccount.getId() + "/charge").contentType(MediaType.APPLICATION_JSON_VALUE) + mvc.perform(post(BASE_URL + payAccount.getId() + "/charge") + .contentType(MediaType.APPLICATION_JSON_VALUE) .content(objectMapper.writeValueAsBytes(command))) .andExpect(status().isBadRequest()); @@ -114,7 +117,8 @@ void negativeAmountTest() throws Exception { PayAccountChargeRequest command = new PayAccountChargeRequest(amount); //when & then - mvc.perform(post(BASE_URL + payAccount.getId() + "/charge").contentType(MediaType.APPLICATION_JSON_VALUE) + mvc.perform(post(BASE_URL + payAccount.getId() + "/charge") + .contentType(MediaType.APPLICATION_JSON_VALUE) .content(objectMapper.writeValueAsBytes(command))) .andExpect(status().isBadRequest());