3030import com .google .gson .Gson ;
3131
3232import workplate .workplateserver .auth .domain .MainExperience ;
33+ import workplate .workplateserver .auth .domain .PhysicalStatus ;
3334import workplate .workplateserver .auth .domain .SubExperience ;
3435import workplate .workplateserver .auth .domain .entity .Member ;
3536import workplate .workplateserver .auth .domain .jwt .JwtTokenProvider ;
@@ -76,9 +77,9 @@ class WorkControllerTest {
7677 @ WithMockUser
7778 void findAllTest () throws Exception {
7879 // Given
79- WorkResponse r1 = new WorkResponse ("경비" , "병원을 경비합니다." , 10000L , MainExperience .SERVICE , SubExperience .SECURITY_GUARD );
80- WorkResponse r2 = new WorkResponse ("주간경비" , "병원을 주간에 경비합니다." , 11000L , MainExperience .SERVICE , SubExperience .SECURITY_GUARD );
81- WorkResponse r3 = new WorkResponse ("야간경비" , "병원을 야간에 경비합니다." , 12000L , MainExperience .SERVICE , SubExperience .SECURITY_GUARD );
80+ WorkResponse r1 = new WorkResponse ("경비" , "병원을 경비합니다." , 10000L , "서울" , MainExperience .SERVICE , SubExperience .SECURITY_GUARD , PhysicalStatus . NORMAL );
81+ WorkResponse r2 = new WorkResponse ("주간경비" , "병원을 주간에 경비합니다." , 11000L , "서울" , MainExperience .SERVICE , SubExperience .SECURITY_GUARD , PhysicalStatus . NORMAL );
82+ WorkResponse r3 = new WorkResponse ("야간경비" , "병원을 야간에 경비합니다." , 12000L , "서울" , MainExperience .SERVICE , SubExperience .SECURITY_GUARD , PhysicalStatus . NORMAL );
8283 PageResponse <WorkResponse > response = new PageResponse <>(List .of (r1 , r2 , r3 ));
8384 given (workService .findAll (any ())).willReturn (response );
8485
@@ -104,6 +105,8 @@ void findAllTest() throws Exception {
104105 fieldWithPath ("data.content[].workName" ).description ("소일거리 이름" ),
105106 fieldWithPath ("data.content[].workDetail" ).description ("소일거리 상세 내용" ),
106107 fieldWithPath ("data.content[].workCredit" ).description ("소일거리 시급" ),
108+ fieldWithPath ("data.content[].location" ).description ("소일거리 위치" ),
109+ fieldWithPath ("data.content[].physicalStatus" ).description ("소일거리 건강상태" ),
107110 fieldWithPath ("data.content[].mainCategory" ).description ("소일거리 메인카테고리" ),
108111 fieldWithPath ("data.content[].subCategory" ).description ("소일거리 서브카테고리" ),
109112 fieldWithPath ("data.pageNum" ).description ("현재 페이지 번호" ),
@@ -121,7 +124,7 @@ void findAllTest() throws Exception {
121124 @ WithMockUser
122125 void findByIdTest () throws Exception {
123126 // Given
124- WorkResponse r1 = new WorkResponse ("경비" , "병원을 경비합니다." , 10000L , MainExperience .SERVICE , SubExperience .SECURITY_GUARD );
127+ WorkResponse r1 = new WorkResponse ("경비" , "병원을 경비합니다." , 10000L , "서울" , MainExperience .SERVICE , SubExperience .SECURITY_GUARD , PhysicalStatus . NORMAL );
125128 given (workService .findById (1L )).willReturn (r1 );
126129
127130 // When
@@ -145,6 +148,8 @@ void findByIdTest() throws Exception {
145148 fieldWithPath ("data.workName" ).description ("소일거리 이름" ),
146149 fieldWithPath ("data.workDetail" ).description ("소일거리 상세 내용" ),
147150 fieldWithPath ("data.workCredit" ).description ("소일거리 시급" ),
151+ fieldWithPath ("data.location" ).description ("소일거리 위치" ),
152+ fieldWithPath ("data.physicalStatus" ).description ("소일거리 건강상태" ),
148153 fieldWithPath ("data.mainCategory" ).description ("소일거리 메인카테고리" ),
149154 fieldWithPath ("data.subCategory" ).description ("소일거리 서브카테고리" )
150155 )));
0 commit comments