1
1
package com .tnt .presentation .member ;
2
2
3
- import static com .tnt .domain .constant .Constant .*;
4
- import static org .springframework .http .MediaType .*;
5
- import static org .springframework .test .web .servlet .request .MockMvcRequestBuilders .*;
6
- import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .*;
3
+ import static com .tnt .domain .constant .Constant .TRAINEE ;
4
+ import static com .tnt .domain .constant .Constant .TRAINEE_DEFAULT_IMAGE ;
5
+ import static com .tnt .domain .constant .Constant .TRAINER ;
6
+ import static com .tnt .domain .constant .Constant .TRAINER_DEFAULT_IMAGE ;
7
+ import static org .springframework .http .MediaType .APPLICATION_JSON_VALUE ;
8
+ import static org .springframework .http .MediaType .IMAGE_JPEG_VALUE ;
9
+ import static org .springframework .http .MediaType .MULTIPART_FORM_DATA_VALUE ;
10
+ import static org .springframework .test .web .servlet .request .MockMvcRequestBuilders .multipart ;
11
+ import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .jsonPath ;
12
+ import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .status ;
7
13
8
14
import java .time .LocalDate ;
9
15
import java .util .List ;
@@ -40,7 +46,7 @@ class MemberControllerTest extends AbstractContainerBaseTest {
40
46
void sign_up_trainer_success () throws Exception {
41
47
// given
42
48
SignUpRequest request =
new SignUpRequest (
"fcm-token-test" ,
TRAINER ,
"KAKAO" ,
"12345" ,
"[email protected] " ,
true ,
43
- true , true , true , "홍길동" , LocalDate .of (1990 , 1 , 1 ), 175.0 , 70.0 , "테스트 주의사항" , List .of ("체중 감량" , "근력 향상" ));
49
+ true , true , "홍길동" , LocalDate .of (1990 , 1 , 1 ), 175.0 , 70.0 , "테스트 주의사항" , List .of ("체중 감량" , "근력 향상" ));
44
50
45
51
// when
46
52
var jsonRequest = new MockMultipartFile ("request" , "" , APPLICATION_JSON_VALUE ,
@@ -63,7 +69,7 @@ void sign_up_trainer_success() throws Exception {
63
69
void sign_up_trainee_success () throws Exception {
64
70
// given
65
71
SignUpRequest request =
new SignUpRequest (
"fcm-token-test" ,
TRAINEE ,
"KAKAO" ,
"12345" ,
"[email protected] " ,
true ,
66
- true , true , true , "홍길동" , LocalDate .of (1990 , 1 , 1 ), 175.0 , 70.0 , "테스트 주의사항" , List .of ("체중 감량" , "근력 향상" ));
72
+ true , true , "홍길동" , LocalDate .of (1990 , 1 , 1 ), 175.0 , 70.0 , "테스트 주의사항" , List .of ("체중 감량" , "근력 향상" ));
67
73
68
74
// when
69
75
var jsonRequest = new MockMultipartFile ("request" , "" , APPLICATION_JSON_VALUE ,
@@ -87,7 +93,7 @@ void sign_up_invalid_member_type_fail() throws Exception {
87
93
// given
88
94
SignUpRequest request =
new SignUpRequest (
"fcm-token-test" ,
"invalid_type" ,
"KAKAO" ,
"12345" ,
"[email protected] " ,
89
95
true ,
90
- true , true , true , "홍길동" , LocalDate .of (1990 , 1 , 1 ), 175.0 , 70.0 , "테스트 주의사항" , List .of ("체중 감량" , "근력 향상" ));
96
+ true , true , "홍길동" , LocalDate .of (1990 , 1 , 1 ), 175.0 , 70.0 , "테스트 주의사항" , List .of ("체중 감량" , "근력 향상" ));
91
97
92
98
// when
93
99
var jsonRequest = new MockMultipartFile ("request" , "" , APPLICATION_JSON_VALUE ,
@@ -106,7 +112,7 @@ void sign_up_invalid_member_type_fail() throws Exception {
106
112
void sign_up_missing_required_field_fail () throws Exception {
107
113
// given
108
114
SignUpRequest request =
new SignUpRequest (
"" ,
TRAINER ,
"KAKAO" ,
"12345" ,
"[email protected] " ,
true ,
109
- true , true , true , "홍길동" , LocalDate .of (1990 , 1 , 1 ), 175.0 , 70.0 , "테스트 주의사항" , List .of ("체중 감량" , "근력 향상" ));
115
+ true , true , "홍길동" , LocalDate .of (1990 , 1 , 1 ), 175.0 , 70.0 , "테스트 주의사항" , List .of ("체중 감량" , "근력 향상" ));
110
116
111
117
// when
112
118
var jsonRequest = new MockMultipartFile ("request" , "" , APPLICATION_JSON_VALUE ,
0 commit comments