From beebe844fe21cb64f91ee8de129353dab521972c Mon Sep 17 00:00:00 2001 From: kwonyj1022 Date: Fri, 17 Nov 2023 16:23:23 +0900 Subject: [PATCH] =?UTF-8?q?ci:=20=EC=B6=A9=EB=8F=8C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/ChatRoomControllerTest.java | 24 +++++++------------ .../fixture/ChatRoomControllerFixture.java | 10 ++++---- 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/backend/ddang/src/test/java/com/ddang/ddang/chat/presentation/ChatRoomControllerTest.java b/backend/ddang/src/test/java/com/ddang/ddang/chat/presentation/ChatRoomControllerTest.java index d0f948c66..5d9f61dcb 100644 --- a/backend/ddang/src/test/java/com/ddang/ddang/chat/presentation/ChatRoomControllerTest.java +++ b/backend/ddang/src/test/java/com/ddang/ddang/chat/presentation/ChatRoomControllerTest.java @@ -241,20 +241,14 @@ void setUp() { .andExpectAll( status().isOk(), jsonPath("$.[0].id", is(조회용_채팅방1.id()), Long.class), - jsonPath("$.[0].chatPartner.name", is(조회용_채팅방1.partnerDto() - .name())), - jsonPath("$.[0].auction.title", is(조회용_채팅방1.auctionDto() - .title())), - jsonPath("$.[0].lastMessage.contents", is(조회용_채팅방1.lastMessageDto() - .contents())), + jsonPath("$.[0].chatPartner.name", is(조회용_채팅방1.partnerDto().name())), + jsonPath("$.[0].auction.title", is(조회용_채팅방1.auctionDto().title())), + jsonPath("$.[0].lastMessage.contents", is(조회용_채팅방1.lastMessageDto().contents())), jsonPath("$.[0].unreadMessageCount", is(조회용_채팅방1.unreadMessageCount()), Long.class), jsonPath("$.[1].id", is(조회용_채팅방2.id()), Long.class), - jsonPath("$.[1].chatPartner.name", is(조회용_채팅방2.partnerDto() - .name())), - jsonPath("$.[1].auction.title", is(조회용_채팅방2.auctionDto() - .title())), - jsonPath("$.[1].lastMessage.contents", is(조회용_채팅방2.lastMessageDto() - .contents())), + jsonPath("$.[1].chatPartner.name", is(조회용_채팅방2.partnerDto().name())), + jsonPath("$.[1].auction.title", is(조회용_채팅방2.auctionDto().title())), + jsonPath("$.[1].lastMessage.contents", is(조회용_채팅방2.lastMessageDto().contents())), jsonPath("$.[1].unreadMessageCount", is(조회용_채팅방1.unreadMessageCount()), Long.class) ); readAllParticipatingChatRooms_문서화(resultActions); @@ -288,10 +282,8 @@ void setUp() { .andExpectAll( status().isOk(), jsonPath("$.id", is(조회용_참가중인_채팅방.id()), Long.class), - jsonPath("$.chatPartner.name", is(조회용_참가중인_채팅방.partnerDto() - .name())), - jsonPath("$.auction.title", is(조회용_참가중인_채팅방.auctionDto() - .title())) + jsonPath("$.chatPartner.name", is(조회용_참가중인_채팅방.partnerDto().name())), + jsonPath("$.auction.title", is(조회용_참가중인_채팅방.auctionDto().title())) ); readChatRoom_문서화(resultActions); } diff --git a/backend/ddang/src/test/java/com/ddang/ddang/chat/presentation/fixture/ChatRoomControllerFixture.java b/backend/ddang/src/test/java/com/ddang/ddang/chat/presentation/fixture/ChatRoomControllerFixture.java index 6d83db0e4..39e081602 100644 --- a/backend/ddang/src/test/java/com/ddang/ddang/chat/presentation/fixture/ChatRoomControllerFixture.java +++ b/backend/ddang/src/test/java/com/ddang/ddang/chat/presentation/fixture/ChatRoomControllerFixture.java @@ -18,11 +18,11 @@ public class ChatRoomControllerFixture extends CommonControllerSliceTest { private Long 탈퇴한_사용자_아이디 = 5L; protected PrivateClaims 사용자_ID_클레임 = new PrivateClaims(1L); - protected ReadUserInChatRoomDto 판매자 = new ReadUserInChatRoomDto(1L, "판매자", 1L, 5.0d, false); - private ReadUserInChatRoomDto 구매자1 = new ReadUserInChatRoomDto(2L, "구매자1", 2L, 5.0d, false); - private ReadUserInChatRoomDto 구매자2 = new ReadUserInChatRoomDto(3L, "구매자2", 3L, 5.0d, false); - private ReadAuctionInChatRoomDto 조회용_경매1 = new ReadAuctionInChatRoomDto(1L, "경매1", 10_000, 1L); - private ReadAuctionInChatRoomDto 조회용_경매2 = new ReadAuctionInChatRoomDto(2L, "경매2", 20_000, 1L); + protected ReadUserInChatRoomDto 판매자 = new ReadUserInChatRoomDto(1L, "판매자", "profileImage1.png", 5.0d, false); + private ReadUserInChatRoomDto 구매자1 = new ReadUserInChatRoomDto(2L, "구매자1", "profileImage2.png", 5.0d, false); + private ReadUserInChatRoomDto 구매자2 = new ReadUserInChatRoomDto(3L, "구매자2", "profileImage3.png", 5.0d, false); + private ReadAuctionInChatRoomDto 조회용_경매1 = new ReadAuctionInChatRoomDto(1L, "경매1", 10_000, "auctionImage1.png"); + private ReadAuctionInChatRoomDto 조회용_경매2 = new ReadAuctionInChatRoomDto(2L, "경매2", 20_000, "auctionImage2.png"); protected ReadChatRoomWithLastMessageDto 조회용_채팅방1 = new ReadChatRoomWithLastMessageDto(1L, 조회용_경매1, 구매자1, new ReadLastMessageDto(1L, LocalDateTime.now(), 판매자, 구매자1, "메시지1"), 1L, true); protected ReadChatRoomWithLastMessageDto 조회용_채팅방2 = new ReadChatRoomWithLastMessageDto(2L, 조회용_경매2, 구매자2, new ReadLastMessageDto(1L, LocalDateTime.now(), 판매자, 구매자2, "메시지2"), 1L, true); protected CreateMessageRequest 메시지_생성_요청 = new CreateMessageRequest(1L, "메시지 내용");