File tree Expand file tree Collapse file tree
src/test/java/eureca/capstone/project/admin/report/service Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ void acceptRestrictions_Restriction_Success() {
224224 when (reportHistoryRepository .findByRestrictionTarget (restrictionTarget )).thenReturn (List .of (report1 ));
225225
226226 // [수정] UserDataRepository에 대한 Mock 설정 추가
227- UserData mockUserData = new UserData ();
227+ UserData mockUserData = UserData . builder (). sellableDataMb ( 100L ). userId ( user1 . getUserId ()). build ();
228228 when (userDataRepository .findByUserId (user1 .getUserId ())).thenReturn (Optional .of (mockUserData ));
229229
230230 // when
@@ -275,7 +275,7 @@ void acceptRestrictions_Restriction_newUserAuthority_success() {
275275 when (restrictionAuthorityRepository .findAuthoritiesByRestrictionTypeId (1L )).thenReturn (List .of (authority ));
276276
277277 // [수정] UserDataRepository에 대한 Mock 설정 추가
278- UserData mockUserData = new UserData ();
278+ UserData mockUserData = UserData . builder (). sellableDataMb ( 100L ). userId ( user1 . getUserId ()). build ();
279279 when (userDataRepository .findByUserId (user1 .getUserId ())).thenReturn (Optional .of (mockUserData ));
280280
281281 // when
@@ -329,7 +329,7 @@ void acceptRestrictions_Restriction_extendUserAuthority_success() {
329329 when (restrictionAuthorityRepository .findAuthoritiesByRestrictionTypeId (1L )).thenReturn (List .of (authority ));
330330
331331 // [수정] UserDataRepository에 대한 Mock 설정 추가
332- UserData mockUserData = new UserData ();
332+ UserData mockUserData = UserData . builder (). sellableDataMb ( 100L ). userId ( user1 . getUserId ()). build ();
333333 when (userDataRepository .findByUserId (user1 .getUserId ())).thenReturn (Optional .of (mockUserData ));
334334
335335 // when
You can’t perform that action at this time.
0 commit comments