File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
src/test/java/com/somemore/domains/volunteerapply/service Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -91,12 +91,7 @@ void applyWhenDuplicate() {
9191 recruitBoardRepository .save (board );
9292
9393 UUID volunteerId = UUID .randomUUID ();
94- VolunteerApply apply = VolunteerApply .builder ()
95- .volunteerId (volunteerId )
96- .recruitBoardId (board .getId ())
97- .status (WAITING )
98- .attended (false )
99- .build ();
94+ VolunteerApply apply = createVolunteerApply (volunteerId , board .getId ());
10095 volunteerApplyRepository .save (apply );
10196
10297 VolunteerApplyCreateRequestDto dto = VolunteerApplyCreateRequestDto .builder ()
@@ -111,7 +106,16 @@ void applyWhenDuplicate() {
111106 .hasMessage (DUPLICATE_APPLICATION .getMessage ());
112107 }
113108
114- private static RecruitBoard createRecruitBoard (RecruitStatus status ) {
109+ private VolunteerApply createVolunteerApply (UUID volunteerId , Long recruitBoardId ) {
110+ return VolunteerApply .builder ()
111+ .volunteerId (volunteerId )
112+ .recruitBoardId (recruitBoardId )
113+ .status (WAITING )
114+ .attended (false )
115+ .build ();
116+ }
117+
118+ private RecruitBoard createRecruitBoard (RecruitStatus status ) {
115119
116120 LocalDateTime startDateTime = createStartDateTime ();
117121 LocalDateTime endDateTime = startDateTime .plusHours (2 );
You can’t perform that action at this time.
0 commit comments