Skip to content

Conversation

@oneokiwa
Copy link

  • given - when - then 패턴을 따르도록 구성했습니다
  • 일단은 ReplyEntity.create에 validation 추가해서 테스트 진행했습니다!

주요 테스트 항목

1. 댓글 생성 성공

  • content, 생성 유저, 연결된 게시글 모두 정상 매핑되는지 확인

2. 댓글 생성 실패

2.1 게시글 없음

  • 존재하지 않는 postId로 create 호출시CustomException 발생 검사

2.2 유저 없음

  • 존재하지 않는 userId로 create 호출시 CustomException 발생 검사

2.3 댓글 내용 없음

  • ErrorCode에 REPLY_EMPTY_CONTENT 추가
  • StringUtils.hasText() validation 추가
  • ValueSource로 null, blank 한번에 검사

논의 사항

다른 분들과 마찬가지로 Entity에 if문을 작성하였는데, 내일 컨벤션 정의 후 수정이 필요할 것 같습니다

@oneokiwa oneokiwa self-assigned this Nov 13, 2025
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.

2 participants