-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: extract json file from test content [#351]
- Loading branch information
Showing
19 changed files
with
101 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,16 +27,7 @@ void addFarmQna() throws Exception { | |
mockMvc.perform( | ||
post("/api/farmqna/add") | ||
.contentType(MediaType.APPLICATION_JSON) | ||
.content("{\n" | ||
+ " \"farm_qna_name\": \"김철수\",\n" | ||
+ " \"phone_number\": \"010-3991-7102\",\n" | ||
+ " \"email\": \"[email protected]\",\n" | ||
+ " \"farm_name\": \"속초농장\",\n" | ||
+ " \"farm_address\": \"강원도 속초시 교동 밤골3길\",\n" | ||
+ " \"cow_num\": \"100\",\n" | ||
+ " \"feed_name\": \"먹이이름입니다.\",\n" | ||
+ " \"available_date\": \"2022-02-20\"\n" | ||
+ "}") | ||
.content(readJson("json/farmQna/addFarmQna.json")) | ||
.accept(MediaType.APPLICATION_JSON) | ||
) | ||
.andExpect(status().isOk()) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,16 +185,7 @@ void addQna() throws Exception { | |
mockMvc.perform( | ||
post("/api/qna/add") | ||
.contentType(MediaType.APPLICATION_JSON) | ||
.content( | ||
"{" | ||
+ " \"category\": \"INVESTMENT\",\n" | ||
+ " \"qna_name\": \"KimJiHun\",\n" | ||
+ " \"phone_number\": \"010-1234-5678\",\n" | ||
+ " \"email\": \"[email protected]\",\n" | ||
+ " \"title\": \"투자 문의 입니다.\",\n" | ||
+ " \"message\": \"이메일 혹은 전화로 연락 부탁드립니다.\"\n" | ||
+ "}" | ||
) | ||
.content(readJson("/json/qna/addQna.json")) | ||
.accept(MediaType.APPLICATION_JSON) | ||
) | ||
.andExpect(status().isOk()) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,14 +38,7 @@ void registerManager() throws Exception { | |
mockMvc.perform( | ||
post("/api/register") | ||
.contentType(MediaType.APPLICATION_JSON) | ||
.content( | ||
"{\n" | ||
+ " \"email\": \"[email protected]\",\n" | ||
+ " \"username\": \"김지훈\",\n" | ||
+ " \"password\": \"passwordAndPassword2\",\n" | ||
+ " \"password2\": \"passwordAndPassword2\"\n" | ||
+ "}" | ||
) | ||
.content(readJson("json/manager/registerManger.json")) | ||
) | ||
.andExpect(status().isOk()) | ||
.andDo( | ||
|
@@ -73,12 +66,7 @@ void login() throws Exception { | |
mockMvc.perform( | ||
post("/api/login") | ||
.contentType(MediaType.APPLICATION_JSON) | ||
.content( | ||
"{\n" | ||
+ " \"email\": \"[email protected]\",\n" | ||
+ " \"password\": \"q1w2e3r4\"\n" | ||
+ "}" | ||
) | ||
.content(readJson("json/manager/login.json")) | ||
) | ||
.andExpect(status().isOk()) | ||
.andDo( | ||
|
@@ -251,10 +239,7 @@ void findManager() throws Exception { | |
mockMvc.perform( | ||
post("/api/findmanager") | ||
.contentType(MediaType.APPLICATION_JSON) | ||
.content("{\n" | ||
+ "\"email\": \"[email protected]\",\n" | ||
+ "\"username\": \"가나다\"\n" | ||
+ "}") | ||
.content(readJson("json/manager/findManager.json")) | ||
) | ||
.andExpect(status().isOk()) | ||
.andDo( | ||
|
@@ -330,10 +315,7 @@ void changePassword() throws Exception { | |
mockMvc.perform( | ||
patch("/api//authentication/findmanager/{token}/change-password", findToken.getToken()) | ||
.contentType(MediaType.APPLICATION_JSON) | ||
.content("{" | ||
+ "\"password1\" : \"123123\",\n" | ||
+ "\"password2\" : \"123123\"\n" | ||
+ "}") | ||
.content(readJson("/json/manager/changePassword.json")) | ||
) | ||
.andExpect(status().isOk()) | ||
.andDo( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"faq_category": "AUCTION", | ||
"title": "FAQ 제목입니다.", | ||
"message": "FAQ 내용입니다.", | ||
"status": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"id_list" : [1,2] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"id": "1", | ||
"faq_category": "AUCTION", | ||
"title": "수정된 FAQ 제목입니다.", | ||
"message": "수정된 FAQ 내용입니다.", | ||
"status": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"farm_qna_name": "김철수", | ||
"phone_number": "010-3991-7102", | ||
"email": "[email protected]", | ||
"farm_name": "속초농장", | ||
"farm_address": "강원도 속초시 교동 밤골3길", | ||
"cow_num": "100", | ||
"feed_name": "먹이이름입니다.", | ||
"available_date": "2022-02-20" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"password1": "newPassword6403", | ||
"password2": "newPassword6403" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"email": "[email protected]", | ||
"username": "김지훈" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"email": "[email protected]", | ||
"password": "q1w2e3r4" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"email": "[email protected]", | ||
"username": "김지훈", | ||
"password": "passwordAndPassword2", | ||
"password2": "passwordAndPassword2" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"notice_category": "INSPECTION", | ||
"title": "공지사항 제목입니다.", | ||
"message": "공지사항 내용입니다.", | ||
"status": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"id_list": [1,2] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"id": "1", | ||
"notice_category": "INSPECTION", | ||
"title": "수정된 공지사항 제목입니다.", | ||
"message": "수정된 공지사항 내용입니다.", | ||
"status": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"category": "INVESTMENT", | ||
"qna_name": "KimJiHun", | ||
"phone_number": "010-1234-5678", | ||
"email": "[email protected]", | ||
"title": "투자 문의 입니다.", | ||
"message": "이메일 혹은 전화로 연락 부탁드립니다." | ||
} |