5151import org .sopt .makers .crew .main .meeting .v2 .dto .request .MeetingV2CreateMeetingBodyDto ;
5252import org .sopt .makers .crew .main .meeting .v2 .dto .request .MeetingV2UpdateMeetingBodyDto ;
5353import org .sopt .makers .crew .main .meeting .v2 .dto .response .ApplyInfoDto ;
54+ import org .sopt .makers .crew .main .meeting .v2 .dto .response .ApplyMemberInfoDto ;
5455import org .sopt .makers .crew .main .meeting .v2 .dto .response .ApplyWholeInfoDto ;
5556import org .sopt .makers .crew .main .meeting .v2 .dto .response .MeetingGetApplyListResponseDto ;
5657import org .sopt .makers .crew .main .meeting .v2 .dto .response .MeetingV2ApplyMeetingResponseDto ;
@@ -152,6 +153,19 @@ private void saveApplyUser(Integer meetingId, Integer userId, String name, Strin
152153 applyRepository .save (apply );
153154 }
154155
156+ private void assertAppliedInfoMembers (MeetingV2GetMeetingPartMembersResponseDto responseDto ,
157+ List <Integer > applyNumbers , List <String > memberNames , List <String > memberProfileImages ) {
158+ Assertions .assertThat (responseDto .appliedInfo ())
159+ .extracting (ApplyMemberInfoDto ::getApplyNumber )
160+ .containsExactlyElementsOf (applyNumbers );
161+ Assertions .assertThat (responseDto .appliedInfo ())
162+ .extracting (applyInfo -> applyInfo .getUser ().getName ())
163+ .containsExactlyElementsOf (memberNames );
164+ Assertions .assertThat (responseDto .appliedInfo ())
165+ .extracting (applyInfo -> applyInfo .getUser ().getProfileImage ())
166+ .containsExactlyElementsOf (memberProfileImages );
167+ }
168+
155169 @ Nested
156170 class 모임_생성 {
157171 @ ParameterizedTest
@@ -1237,9 +1251,7 @@ void nonActiveGenerationUser_getMeetingById_participantPartInfo() {
12371251 Assertions .assertThat (responseDto .participantCount ()).isEqualTo (1 );
12381252 Assertions .assertThat (responseDto .isActiveGeneration ()).isFalse ();
12391253 Assertions .assertThat (responseDto .activeGeneration ()).isEqualTo (33 );
1240- Assertions .assertThat (responseDto .memberIds ()).containsExactly (1 );
1241- Assertions .assertThat (responseDto .memberNames ()).containsExactly ("승인신청자" );
1242- Assertions .assertThat (responseDto .memberProfileImages ()).containsExactly ("profile2.jpg" );
1254+ assertAppliedInfoMembers (responseDto , List .of (1 ), List .of ("승인신청자" ), List .of ("profile2.jpg" ));
12431255 }
12441256
12451257 @ Test
@@ -1284,9 +1296,7 @@ void activeGenerationServerUser_getMeetingById_backendApplicant_samePart() {
12841296 Assertions .assertThat (responseDto .participantCount ()).isEqualTo (1 );
12851297 Assertions .assertThat (responseDto .isActiveGeneration ()).isTrue ();
12861298 Assertions .assertThat (responseDto .activeGeneration ()).isEqualTo (35 );
1287- Assertions .assertThat (responseDto .memberIds ()).containsExactly (1 );
1288- Assertions .assertThat (responseDto .memberNames ()).containsExactly ("백엔드신청자" );
1289- Assertions .assertThat (responseDto .memberProfileImages ()).containsExactly ("backend-profile.jpg" );
1299+ assertAppliedInfoMembers (responseDto , List .of (1 ), List .of ("백엔드신청자" ), List .of ("backend-profile.jpg" ));
12901300 }
12911301
12921302 @ Test
@@ -1317,9 +1327,7 @@ void honoraryGenerationUser_getMeetingById_latestHonoraryGenerationApplicantInfo
13171327 Assertions .assertThat (responseDto .isActiveGeneration ()).isFalse ();
13181328 Assertions .assertThat (responseDto .activeGeneration ()).isEqualTo (37 );
13191329 Assertions .assertThat (responseDto .participantCount ()).isEqualTo (1 );
1320- Assertions .assertThat (responseDto .memberIds ()).containsExactly (1 );
1321- Assertions .assertThat (responseDto .memberNames ()).containsExactly ("37기신청자" );
1322- Assertions .assertThat (responseDto .memberProfileImages ()).containsExactly ("profile.jpg" );
1330+ assertAppliedInfoMembers (responseDto , List .of (1 ), List .of ("37기신청자" ), List .of ("profile.jpg" ));
13231331 }
13241332
13251333 @ Test
@@ -1451,9 +1459,7 @@ void activeGenerationUser_getMeetingPartMembers_success() {
14511459 Assertions .assertThat (responseDto .isActiveGeneration ()).isTrue ();
14521460 Assertions .assertThat (responseDto .activeGeneration ()).isEqualTo (35 );
14531461 Assertions .assertThat (responseDto .participantCount ()).isEqualTo (1 );
1454- Assertions .assertThat (responseDto .memberIds ()).containsExactly (1 );
1455- Assertions .assertThat (responseDto .memberNames ()).containsExactly ("35기iOS신청자" );
1456- Assertions .assertThat (responseDto .memberProfileImages ()).containsExactly ("profile.jpg" );
1462+ assertAppliedInfoMembers (responseDto , List .of (1 ), List .of ("35기iOS신청자" ), List .of ("profile.jpg" ));
14571463 }
14581464
14591465 @ Test
@@ -1474,9 +1480,8 @@ void serverUser_getMeetingPartMembers_backendApplicant_samePart() {
14741480 Assertions .assertThat (responseDto .isActiveGeneration ()).isFalse ();
14751481 Assertions .assertThat (responseDto .activeGeneration ()).isEqualTo (33 );
14761482 Assertions .assertThat (responseDto .participantCount ()).isEqualTo (2 );
1477- Assertions .assertThat (responseDto .memberIds ()).containsExactly (1 , 2 );
1478- Assertions .assertThat (responseDto .memberNames ()).containsExactly ("승인신청자" , "33기백엔드신청자" );
1479- Assertions .assertThat (responseDto .memberProfileImages ()).containsExactly ("profile2.jpg" , "profile.jpg" );
1483+ assertAppliedInfoMembers (responseDto , List .of (1 , 2 ), List .of ("승인신청자" , "33기백엔드신청자" ),
1484+ List .of ("profile2.jpg" , "profile.jpg" ));
14801485 }
14811486
14821487 @ Test
@@ -1497,9 +1502,8 @@ void planUser_getMeetingPartMembers_pmApplicant_samePart() {
14971502 Assertions .assertThat (responseDto .isActiveGeneration ()).isFalse ();
14981503 Assertions .assertThat (responseDto .activeGeneration ()).isEqualTo (33 );
14991504 Assertions .assertThat (responseDto .participantCount ()).isEqualTo (2 );
1500- Assertions .assertThat (responseDto .memberIds ()).containsExactly (1 , 2 );
1501- Assertions .assertThat (responseDto .memberNames ()).containsExactly ("승인신청자" , "PM신청자" );
1502- Assertions .assertThat (responseDto .memberProfileImages ()).containsExactly ("profile2.jpg" , "profile.jpg" );
1505+ assertAppliedInfoMembers (responseDto , List .of (1 , 2 ), List .of ("승인신청자" , "PM신청자" ),
1506+ List .of ("profile2.jpg" , "profile.jpg" ));
15031507 }
15041508
15051509 @ Test
@@ -1526,9 +1530,7 @@ void webUser_getMeetingPartMembers_frontendApplicant_samePart() {
15261530 Assertions .assertThat (responseDto .isActiveGeneration ()).isTrue ();
15271531 Assertions .assertThat (responseDto .activeGeneration ()).isEqualTo (35 );
15281532 Assertions .assertThat (responseDto .participantCount ()).isEqualTo (1 );
1529- Assertions .assertThat (responseDto .memberIds ()).containsExactly (1 );
1530- Assertions .assertThat (responseDto .memberNames ()).containsExactly ("프론트엔드신청자" );
1531- Assertions .assertThat (responseDto .memberProfileImages ()).containsExactly ("profile.jpg" );
1533+ assertAppliedInfoMembers (responseDto , List .of (1 ), List .of ("프론트엔드신청자" ), List .of ("profile.jpg" ));
15321534 }
15331535
15341536 @ Test
0 commit comments