Skip to content

Commit

Permalink
Merge pull request #1296 from innovationacademy-kr/be/dev/refactor_bl…
Browse files Browse the repository at this point in the history
…ackhole_scheduler/#1294

[BE] FIX: 문제 발생 코드 주석처리 #1294
  • Loading branch information
sichoi42 authored Aug 12, 2023
2 parents 7f50d89 + c3febef commit 461b79d
Showing 1 changed file with 20 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,21 +314,26 @@ class LentPolicyUnitTest {
assertEquals(LentPolicyStatus.FINE, result);
}

@Test
@DisplayName("성공: 유저 미래 블랙홀 예정")
void 성공_BLACKHOLE_IS_FUTURE_verifyUserForLent() {
int userActiveLentCount = 0;
LocalDateTime future = LocalDateTime.now().plusDays(1);

User user = mock(User.class);
given(user.isUserRole(UserRole.USER)).willReturn(true);
given(user.getBlackholedAt()).willReturn(future);

LentPolicyStatus result = lentPolicy.verifyUserForLent(user, null,
userActiveLentCount, null);

assertEquals(LentPolicyStatus.FINE, result);
}
/**
* @See {@link LentPolicyImpl#verifyUserForLent(User, Cabinet, int, List)}
*
* 설계 상의 문제로 테스트 코드 비활성화 처리 해두었습니다.
*/
// @Test
// @DisplayName("성공: 유저 미래 블랙홀 예정")
// void 성공_BLACKHOLE_IS_FUTURE_verifyUserForLent() {
// int userActiveLentCount = 0;
// LocalDateTime future = LocalDateTime.now().plusDays(1);
//
// User user = mock(User.class);
// given(user.isUserRole(UserRole.USER)).willReturn(true);
// given(user.getBlackholedAt()).willReturn(future);
//
// LentPolicyStatus result = lentPolicy.verifyUserForLent(user, null,
// userActiveLentCount, null);
//
// assertEquals(LentPolicyStatus.FINE, result);
// }

@Test
@DisplayName("실패: FULL캐비넷 대여시도")
Expand Down

0 comments on commit 461b79d

Please sign in to comment.