Skip to content
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

GETP-113 feat: 피플 좋아요 취소 기능 구현 #53

Merged
merged 4 commits into from
Jul 11, 2024

Conversation

wlgns12370
Copy link
Member

✨ 구현한 기능

  • 피플 좋아요 취소 기능

📢 논의하고 싶은 내용

  • PeopleLikeService.get(Long Long) 메서드를 테스트를 하지 않는다면 private 처리를 할 수 있는데 테스트를 위해서 public으로 변경하였습니다. 이런 경우 최종 배포전 테스트까지는 public으로 두다가 private으로 변경하는 게 어떨까요? 이 부분은 잘 몰라서 논의해 보고 싶네요!
  • 객체지향 다형성을 높이기 위해서 PeopleLikeService.get메서드에 오버로딩을 적용해 보았습니다! 해당 부분에 대해서 의견 부탁드립니다!
    PeopleServicegetByMemberIdgetByPeopleId는 매개변수가 Long타입 하나로 중복됩니다. 하지만 매개변수 타입이 중복되지 않는 ServiceClassget메서드는 앞으로 오버로딩 하는 방법으로 사용하면 어떨까요?
private PeopleLike get(Optional<PeopleLike> peopleLike) {
    return peopleLike.orElseThrow(() -> new BusinessLogicException(PeopleLikeErrorCode.PEOPLE_LIKE_NOT_FOUND));
}

public PeopleLike get(Long memberId, Long peopleId) {
    return get(peopleLikeRepository.findByPeople_PeopleIdAndClient_ClientId(memberId, peopleId));
}

🎸 기타

  • TestFixture 파일도 Domain 기준으로 분리하는 게 어떨까요??

@scv1702
Copy link
Member

scv1702 commented Apr 8, 2024

테스트 Fixture에 관한 것은 domain/{domainName}/support 또는 domain/{domainName}/fixture 이런 식으로 분리하는 것이 저도 좋아보여요.

Copy link
Member

@scv1702 scv1702 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다! 리뷰 참고해주세요.

Copy link

Test Results

102 tests  +4   102 ✅ +4   19s ⏱️ +2s
 69 suites  - 1     0 💤 ±0 
 69 files    - 1     0 ❌ ±0 

Results for commit f7691ee. ± Comparison against base commit b90f2b7.

@scv1702 scv1702 merged commit 31fb32f into develop Jul 11, 2024
2 checks passed
@scv1702 scv1702 deleted the feature/GETP-113 branch July 11, 2024 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants