-
Notifications
You must be signed in to change notification settings - Fork 0
[🎉deploy] CI/CD 테스트 진행 #65
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 사용자(User)와 연관된 스크랩 정보를 저장하는 Scrap 엔티티 정의 - 스크랩 상태 관리(SCRAPPED/UNSCRAPPED)를 위한 ScrapStatus Enum과 연동 - 스크랩 생성 정적 팩토리 메서드 `of(User user)` 제공 - 상태 전이 메서드(scrap, unscrap) 및 상태 확인 메서드(isScrapped, isUnscrapped) 추가 - 불필요한 Scraps 클래스 제거
- SCRAPPED, UNSCRAPPED 두 가지 상태를 정의하는 ScrapStatus Enum 구현 - 문자열 입력으로부터 Enum 매핑 기능(from) 및 유효성 검증 메서드(isValid) 제공 - 동일 상태로의 중복 전이를 방지하는 scrap(), unscrap() 메서드 구현 - 상태 확인 메서드(isScrapped, isUnscrapped) 및 Jackson 직렬화/역직렬화 설정 추가 - 잘못된 상태 입력 또는 중복 전이 시 ScrapException 발생 처리
- from() 메서드의 유효/무효 입력값 처리 검증 - scrap(), unscrap() 전이 메서드 정상 동작 및 예외 케이스 테스트 - isScrapped(), isValid() 등의 유틸성 메서드에 대한 테스트 포함 - 대소문자 구분 없이 상태 변환 가능함을 검증
- ScrapStatus 입력값이 null인 경우를 명확히 처리하기 위해 SCRAP_STATUS_CANNOT_BE_NULL 코드 추가 - from() 메서드 내 null 체크와 연계하여 예외 메시지 명확화
- 입력값이 null일 경우 ScrapStatus.from()에서 NPE 방지를 위해 명시적 검증 로직 추가 - ScrapException을 통해 SCRAP_STATUS_CANNOT_BE_NULL 예외 코드 반환 - null 검증 책임을 분리한 validateNotNull() 메서드로 구현
- ScrapStatus.from(null) 호출 시 ScrapException 발생 여부 테스트 - isValid(null) 호출 시 false 반환 테스트 추가 - null 입력값 처리 로직에 대한 테스트 커버리지 보완
- 메인 메시지 null 여부 및 유효성 검증 에러 추가 - 메시지 포맷 시 파라미터 누락 및 값 누락에 대한 에러 정의 - 공통 인터페이스 ErrorCode 구현
- 메시지 관련 예외 처리를 위한 MessageException 클래스 정의 - BaseException 상속 및 MessageErrorCode 기반 생성자 구현
- 템플릿 내 플레이스홀더를 파라미터로 치환하는 포맷 메서드 정의 - 포맷팅 필요 여부에 따라 파라미터 검증 및 치환 수행 - 누락된 파라미터나 값이 있을 경우 MessageException 발생 - MessageTemplate 인터페이스 구현을 위한 추상 클래스 설계
- 사용자에게 보여줄 메인 메시지를 Enum 형태로 정의 - 각 항목은 포맷팅이 필요 없는 고정 메시지로 구성 - AbstractMessageTemplate 상속을 통해 포맷팅 기능 확장
- 메시지 전송 대상 구분을 위한 타입 정의 - 스크랩한 사용자(SCRAPPED_USER)와 전체 사용자(ALL_USERS) 구분
- 메인/서브 메시지 및 타겟 유형을 조합한 템플릿 타입 정의 - 메시지 종류별로 메인 메시지, 서브 메시지, 대상 사용자 연결 - 각 템플릿 타입에서 메시지 포맷 메서드(main, sub) 제공
- 사용자 이름을 포함하는 메시지 본문(SubMessage) 템플릿 정의 - 포맷팅이 필요한 메시지로 구성되어 파라미터 기반 치환 수행 - AbstractMessageTemplate 상속으로 포맷팅 로직 재사용
- Messages → Message로 클래스명 단수형으로 변경하여 의미 명확화 - 동일한 필드(mainMessage, subMessage)는 유지 - 기존 Messages 클래스 제거 및 새로운 Message 클래스 적용
- 메시지 문자열을 반환하는 value 메서드 정의 - 포맷팅 필요 여부를 판단하는 needsFormatting 메서드 정의 - 파라미터 기반 포맷을 수행하는 format 메서드 포함 - AbstractMessageTemplate, MainMessage, SubMessage 등에서 구현 예정
- Messages 클래스명을 Message로 변경함에 따라 필드 타입 및 import 구문 수정 - 관련 JPA 매핑 어노테이션 유지 (cascade, orphanRemoval 등)
- MessageTemplateType의 main/sub 메시지 포맷 정상 동작 테스트 - 파라미터 누락, 잘못된 키, null 값 등에 대한 예외 케이스 검증 - 포맷이 불필요한 메인 메시지와 여분 파라미터 무시 동작 확인 - AbstractMessageTemplate의 중복 플레이스홀더 처리 테스트 포함
- messageTemplateType 필드 추가 및 Enum 매핑 처리 - formattedMainMessage, formattedSubMessage 필드 추가 - MessageTemplateType 기반 메시지 생성을 위한 of 정적 메서드 구현 - 동일 템플릿 타입 비교를 위한 isSameType 메서드 추가
- MessageTemplateType을 기반으로 Message 객체 생성 기능 테스트 - main/sub 메시지 포맷 정상 동작 여부 검증 - 포맷 파라미터 누락, null 값, 잘못된 키 등의 예외 케이스 검증 - isSameType 메서드를 통한 템플릿 타입 비교 기능 테스트
[♻️ refactor] 글로벌 예외 처리 개선
[♻️ refactor] UserName 검증 개선
[♻️ refactor] PushToken 네이밍 변경
[✨ feat] 스크랩 상태를 나타내는 ENUM 구현
[🔨 Fix] 푸시알림 서버 QA를 위한 코드 수정 및 요구사항 고도화
[♻️ refactor/#70] FCM 데이터 페이로드 형식 수정
[♻️ refactor/#72] FCM 데이터 페이로드 형식 수정
[♻️ refactor] 푸시알림 imageUrl 변경
[♻️ refactor] iOS의 APNs를 고려한 FCM 데이터 페이로드 형식 변경
[♻️ refactor] iOS의 APNs를 고려한 FCM 데이터 페이로드 형식 변경(2)
[♻️ refactor/#79] 스크랩 유저를 동기화 시, oUserId를 기준으로 scrap 테이블에 추가되도록 수정
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.