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

[#16] 신체 정보를 받는다 #33

Merged
merged 17 commits into from
Oct 5, 2024
Merged

[#16] 신체 정보를 받는다 #33

merged 17 commits into from
Oct 5, 2024

Conversation

devholic22
Copy link
Member

📢 Related Issue

💁🏻 Summary

  • 회원의 신체 정보를 저장하는 기능을 개발했습니다.
  • 회원의 프로필에 대한 정보는 출생년도, 성별, 몸무게, 신장으로 하였으며, 이들에 대한 검증 로직을 각각 가지도록 하기 위해 일급 객체로 만들었습니다.
  • 프로필 (Profile) 인자가 많아 빌더 패턴을 서비스와 테스트 코드에서 사용하도록 했습니다.
  • 이용 가능한 최소 나이 / 최대 나이 / 최소 몸무게 / 최대 몸무게 / 최소 신장 / 최대 신장 등에 대한 정보를 임의로 설정해두었습니다.
    • 특히 나이와 관련해서는 입력한 시점에 따라 now로 받는 만큼, 테스트 시 결과가 달라질 수 있기에 YearManager를 만듦으로써 전략 패턴을 적용했습니다.

🧐 More

close #16

- PhysicalProfile entity 작성
- VO를 나타내는 Physical, Gender, Height, Weight, Year 작성
- 관련된 예외 작성
- 관련된 DDL 작성
- PhysicalProfile 리포지터리 인터페이스 및 구현체 작성
- PhysicalProfile 조회 메서드 삭제
- PhysicalProfile 컨트롤러/서비스 연결
- Height, Weight 속성 이름 변경
- 인터셉터 경로 등록
- Gender 단위 테스트 작성
- Height 단위 테스트 작성
- Weight 단위 테스트 작성
- Year 단위 테스트 작성
- 테스트 환경을 구분하기 위해 YearManager 분리, 전략 패턴 적용
- 기존 메서드들에 YearManager 연결
- Physical 단위 테스트 작성
- Year 필드 이름 변경
- PhysicalProfile 단위 테스트 작성
- PhysicalProfileController 통합 테스트 작성
- API 문서화
- PhysicalProfileService final 수정
- MockBeanInjection 등록
- 필요한 fixture 등록
- Physical, PhysicalProfile에 빌더 패턴 적용
- Physical에서 발생하는 예외 테스트 제거
- GenderTest 테스트 이름 수정
- PhysicalProfileService 테스트 작성
- 필요한 fixture repository 등록
- PhysicalProfileJpaRepository 테스트 작성
- Height, Weight, Year 컬럼 이름 중복 문제 수정
- PhysicalProfileService 예외 상황 테스트 추가
Copy link

sonarcloud bot commented Oct 5, 2024

@devholic22 devholic22 merged commit e8018de into develop Oct 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

신체 정보를 받는다
1 participant