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

Feat/#29: 노래 등록 조회, 파트 등록, 킬링파트 조회 기능 구현 ( 수정사항 추가 ) #76

Merged
merged 26 commits into from
Jul 18, 2023

Conversation

splitCoding
Copy link
Collaborator

@splitCoding splitCoding commented Jul 18, 2023

📝작업 내용

  • 노래 등록 기능 구현
  • 노래 조회 기능 구현
    • ID 로 조회
    • 제목으로 조회
  • 노래에 파트 등록 기능 구현
    • 존재하지 않는 파트일 시 등록 후 기본 투표 1개 적용
    • 존재하는 파트일 시 등록하지 않고 투표 1개 적용
  • TOP 킬링파트 조회 기능 구현
    • 파트가 없어서 킬링파트가 없는 경우를 고려하여 KillingPartResponse 에 exist 프로퍼티 추가
  • 킬링파트 목록 조회 기능 구현
    • 최대 3개 조회

💬리뷰 참고사항

동등성 비교를 통한 테스트가 반드시 필요한 객체에 한하여 ID를 포함한 정적 펙토리 메서드를 만들었습니다.

  • 코드 상에서 실수로 ID 를 가진 엔티티를 생성하여 저장할 경우 기존 데이터가 덮어씌워지는 문제가 발생할 수 있기에 Id를 포함한 생성자는 private으로 감추고 메서드명에 의미를 노출했습니다.
    • notPersisted : 영속화, 저장 전
    • persisted : 영속화, 저장 후

JPA를 사용하는 테스트

  • 실제 DB에 반영이 되었는지 정확한 테스트를 위하여 필요한 시기에 entityManger를 flush, clear 한 뒤 실제 DB의 데이터를 통하여 테스트하는 방식을 택했습니다.

#️⃣연관된 이슈

closed #29
closed #30
closed #31

seokhwan-an and others added 26 commits July 14, 2023 12:10
이미지URL 에서 비디오 URL 로 변경
때 오타 수정
notPersisted 에서 forSave
persisted 에서 saved
@github-actions
Copy link

Unit Test Results

77 tests   77 ✔️  1s ⏱️
22 suites    0 💤
22 files      0

Results for commit 7f0307a.

@splitCoding splitCoding changed the title Feat/#29 Feat/#29: 노래 등록 조회, 파트 등록, 킬링파트 조회 기능 구현 ( 수정사항 추가 ) Jul 18, 2023
@splitCoding splitCoding self-assigned this Jul 18, 2023
@splitCoding splitCoding added the 🦋 Bug 🚨 버그 발생! 🚨 label Jul 18, 2023
@splitCoding splitCoding added [ 🌙 BE ] 백엔드 크루들의 멋진 개발 이야기 하나둘셋 야! ✨ Feat 꼼꼼한 기능 구현 중요하죠 labels Jul 18, 2023
@splitCoding splitCoding merged commit a15dabe into develop Jul 18, 2023
@splitCoding splitCoding deleted the feat/#29 branch July 24, 2023 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[ 🌙 BE ] 백엔드 크루들의 멋진 개발 이야기 하나둘셋 야! 🦋 Bug 🚨 버그 발생! 🚨 ✨ Feat 꼼꼼한 기능 구현 중요하죠
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants