-
Notifications
You must be signed in to change notification settings - Fork 0
[UPLUS-125] 그라파나 링크 적용 #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -67,7 +67,7 @@ public Slice<SubscriptionListResponse> getAllSubscriptions(Pageable pageable) { | |||||
| sub, | ||||||
| totalUsedBytes, | ||||||
| subPlan.getAllotmentAmount(), | ||||||
| subPlan.getPlanName(), | ||||||
| subPlan.getPlan().getPlanName(), | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
아마 테스트 코드에서
Suggested change
|
||||||
| decryptedEmail, | ||||||
| decryptedPhone); | ||||||
| }) | ||||||
|
|
@@ -115,7 +115,7 @@ public SubscriptionDetailResponse getSubscriptionDetailByPhone(String phoneRaw) | |||||
| sub, | ||||||
| totalUsedBytes, | ||||||
| subPlan.getAllotmentAmount(), | ||||||
| subPlan.getPlanName(), | ||||||
| subPlan.getPlan().getPlanName(), | ||||||
|
arlen02-01 marked this conversation as resolved.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
이렇게 하면 불필요한 데이터베이스 조회를 피하고,
Suggested change
|
||||||
| decryptedEmail, | ||||||
| decryptedPhone); | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -68,10 +68,7 @@ void getAllSubscriptionsSuccess() { | |||||||
| Slice<Subscription> slice = new SliceImpl<>(List.of(sub)); | ||||||||
|
|
||||||||
| // SubscriptionPlan Mock 설정 (Mockito mock 사용) | ||||||||
| SubscriptionPlan subPlan = org.mockito.Mockito.mock(SubscriptionPlan.class); | ||||||||
| given(subPlan.getSubscription()).willReturn(sub); | ||||||||
| given(subPlan.getAllotmentPeriod()).willReturn(AllotmentPeriod.MONTH); | ||||||||
| given(subPlan.getAllotmentAmount()).willReturn(10240L); | ||||||||
| SubscriptionPlan subPlan = setupMockSubscriptionPlan(sub); | ||||||||
|
|
||||||||
| given(subscriptionRepository.findAllSlice(pageable)).willReturn(slice); | ||||||||
| given(subscriptionPlanRepository.findActivePlanBySubId(1L)) | ||||||||
|
|
@@ -110,10 +107,7 @@ void getSubscriptionDetailByPhoneSuccess() { | |||||||
| Subscription sub = newInstanceSubscription(1L, customer); | ||||||||
|
|
||||||||
| // SubscriptionPlan Mock 설정 (Mockito mock 사용) | ||||||||
| SubscriptionPlan subPlan = org.mockito.Mockito.mock(SubscriptionPlan.class); | ||||||||
| given(subPlan.getSubscription()).willReturn(sub); | ||||||||
| given(subPlan.getAllotmentPeriod()).willReturn(AllotmentPeriod.MONTH); | ||||||||
| given(subPlan.getAllotmentAmount()).willReturn(10240L); | ||||||||
| SubscriptionPlan subPlan = setupMockSubscriptionPlan(sub); | ||||||||
|
|
||||||||
| given(contactHashUtil.hmacSha256Base64(phoneRaw)).willReturn(hash); | ||||||||
| given(subscriptionRepository.findByPhoneHash(hash)).willReturn(Optional.of(sub)); | ||||||||
|
|
@@ -154,6 +148,18 @@ private static Subscription newInstanceSubscription(Long subId, Customer custome | |||||||
| return subscription; | ||||||||
| } | ||||||||
|
|
||||||||
| private static SubscriptionPlan setupMockSubscriptionPlan(Subscription sub) { | ||||||||
| SubscriptionPlan subPlan = org.mockito.Mockito.mock(SubscriptionPlan.class); | ||||||||
| com.project.core.infra.entity.plan.Plan plan = | ||||||||
| org.mockito.Mockito.mock(com.project.core.infra.entity.plan.Plan.class); | ||||||||
|
arlen02-01 marked this conversation as resolved.
Comment on lines
+153
to
+154
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| given(plan.getPlanName()).willReturn("BASIC"); | ||||||||
| given(subPlan.getPlan()).willReturn(plan); | ||||||||
| given(subPlan.getSubscription()).willReturn(sub); | ||||||||
| given(subPlan.getAllotmentPeriod()).willReturn(AllotmentPeriod.MONTH); | ||||||||
| given(subPlan.getAllotmentAmount()).willReturn(10240L); | ||||||||
| return subPlan; | ||||||||
| } | ||||||||
|
|
||||||||
| @Test | ||||||||
| @DisplayName("[조회] 성공 - 고객의 회선 목록 조회(응답 DTO 변환)") | ||||||||
| void findSubscriptionResponsesSuccess() { | ||||||||
|
|
||||||||
Uh oh!
There was an error while loading. Please reload this page.