@@ -65,6 +65,9 @@ class AdminMentorApplicationServiceTest {
6565 private MentorApplication mentorApplication7 ;
6666 private MentorApplication mentorApplication8 ;
6767
68+ private SiteUser user ;
69+ private University university ;
70+
6871 @ BeforeEach
6972 void setUp () {
7073 SiteUser user1 = siteUserFixture .사용자 (1 , "test1" );
@@ -86,6 +89,9 @@ void setUp() {
8689 mentorApplication6 = mentorApplicationFixture .거절된_멘토신청 (user6 .getId (), UniversitySelectType .CATALOG , university2 .getId ());
8790 mentorApplication7 = mentorApplicationFixture .대기중_멘토신청 (user7 .getId (), UniversitySelectType .OTHER , null );
8891 mentorApplication8 = mentorApplicationFixture .거절된_멘토신청 (user8 .getId (), UniversitySelectType .OTHER , null );
92+
93+ user = siteUserFixture .사용자 (9 , "test9" );
94+ university = universityFixture .메이지_대학 ();
8995 }
9096
9197 @ Nested
@@ -518,8 +524,6 @@ class 멘토_지원서_이력_조회 {
518524 @ Test
519525 void 사용자의_멘토_지원서_이력을_최신_생성_내림차순으로_조회한다 () {
520526 // given
521- SiteUser user = siteUserFixture .사용자 ();
522- University university = universityFixture .메이지_대학 ();
523527 MentorApplication app1 = mentorApplicationFixture .거절된_멘토신청 (user .getId (), UniversitySelectType .CATALOG , university .getId ());
524528 MentorApplication app2 = mentorApplicationFixture .거절된_멘토신청 (user .getId (), UniversitySelectType .CATALOG , university .getId ());
525529 MentorApplication app3 = mentorApplicationFixture .승인된_멘토신청 (user .getId (), UniversitySelectType .CATALOG , university .getId ());
@@ -542,8 +546,6 @@ class 멘토_지원서_이력_조회 {
542546 @ Test
543547 void 지원서가_5개를_초과하면_최신_5개만_최신_생성_내림차순으로_조회한다 () {
544548 // given
545- SiteUser user = siteUserFixture .사용자 ();
546- University university = universityFixture .메이지_대학 ();
547549 MentorApplication app1 = mentorApplicationFixture .거절된_멘토신청 (user .getId (), UniversitySelectType .CATALOG , university .getId ());
548550 MentorApplication app2 = mentorApplicationFixture .거절된_멘토신청 (user .getId (), UniversitySelectType .CATALOG , university .getId ());
549551 MentorApplication app3 = mentorApplicationFixture .거절된_멘토신청 (user .getId (), UniversitySelectType .CATALOG , university .getId ());
@@ -570,10 +572,10 @@ class 멘토_지원서_이력_조회 {
570572 @ Test
571573 void 지원서_이력이_없으면_빈_목록을_반환한다 () {
572574 // given
573- SiteUser user = siteUserFixture . 사용자 ();
575+ long withoutApplicationUserId = user . getId ();
574576
575577 // when
576- List <MentorApplicationHistoryResponse > response = adminMentorApplicationService .findMentorApplicationHistory (user . getId () );
578+ List <MentorApplicationHistoryResponse > response = adminMentorApplicationService .findMentorApplicationHistory (withoutApplicationUserId );
577579
578580 // then
579581 assertThat (response ).isEmpty ();
@@ -582,8 +584,6 @@ class 멘토_지원서_이력_조회 {
582584 @ Test
583585 void 응답에_지원서_상태와_거절_사유가_포함된다 () {
584586 // given
585- SiteUser user = siteUserFixture .사용자 ();
586- University university = universityFixture .메이지_대학 ();
587587 mentorApplicationFixture .거절된_멘토신청 (user .getId (), UniversitySelectType .CATALOG , university .getId ());
588588 mentorApplicationFixture .승인된_멘토신청 (user .getId (), UniversitySelectType .CATALOG , university .getId ());
589589
0 commit comments