-
Notifications
You must be signed in to change notification settings - Fork 4
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: 채팅 목록 조회 시 최신순 정렬 적용 #594
Conversation
public int compareTo(CommentLatestResponse other) { | ||
if (this.createdAt == null && other.createdAt == null) { | ||
return 0; | ||
} | ||
if (this.createdAt == null) { | ||
return 1; | ||
} | ||
if (other.createdAt == null) { | ||
return -1; | ||
} | ||
return other.createdAt.compareTo(this.createdAt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment가 없는 경우 null 처리를 하셨군요~
assertEquals(response.offerings().get(0).offeringId(), 2L); | ||
assertEquals(response.offerings().get(1).offeringId(), 1L); | ||
assertEquals(response.offerings().get(2).offeringId(), 3L); | ||
assertEquals(response.offerings().get(3).offeringId(), 4L); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assertAll 을 묶어보는건 어때요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
도라 메이슨 코멘트 하나 남겼어요~~ 고생하셨습니다 ㅎㅎ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
* feat: CommentRoom 정렬 방식 변경 * fix: null 일 땐 맨 아래에 배치하도록 정렬 로직 수정 * test: 잘못 들어온 contextLoads 테스트 제거 * test: 순서 보장 테스트에 containsExactly 사용 --------- Co-authored-by: Choo <choo000407@naver.com>
📌 관련 이슈
close #593
✨ 작업 내용
📚 기타