From 77baab3f1de9b67ce7618c499c06f804ce6b7e51 Mon Sep 17 00:00:00 2001 From: java-saeng Date: Sun, 1 Oct 2023 17:08:53 +0900 Subject: [PATCH] =?UTF-8?q?test=20:=20receiverId=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #663 --- .../notification/domain/NotificationRepositoryTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/emm-sale/src/test/java/com/emmsale/notification/domain/NotificationRepositoryTest.java b/backend/emm-sale/src/test/java/com/emmsale/notification/domain/NotificationRepositoryTest.java index ae60148e1..4054429cd 100644 --- a/backend/emm-sale/src/test/java/com/emmsale/notification/domain/NotificationRepositoryTest.java +++ b/backend/emm-sale/src/test/java/com/emmsale/notification/domain/NotificationRepositoryTest.java @@ -19,7 +19,6 @@ class NotificationRepositoryTest extends JpaRepositorySliceTestHelper { private NotificationRepository notificationRepository; private Notification notification1, notification2, notification3; - private Long receiverId = 26L; @BeforeEach void setUp() { @@ -40,17 +39,17 @@ void setUp() { + "}"; notification1 = notificationRepository.save( - new Notification(NotificationType.COMMENT, receiverId, 3333L, LocalDateTime.now(), + new Notification(NotificationType.COMMENT, 26L, 3333L, LocalDateTime.now(), commentJsonData1) ); notification2 = notificationRepository.save( - new Notification(NotificationType.EVENT, receiverId, 3333L, LocalDateTime.now(), + new Notification(NotificationType.EVENT, 26L, 3333L, LocalDateTime.now(), eventJsonData1) ); notification3 = notificationRepository.save( - new Notification(NotificationType.COMMENT, receiverId, 3333L, LocalDateTime.now(), + new Notification(NotificationType.COMMENT, 3332L, 3333L, LocalDateTime.now(), commentJsonData2) ); } @@ -60,6 +59,7 @@ void setUp() { void test_findAllByReceiverId() throws Exception { //given final List expect = List.of(notification1, notification2); + final long receiverId = 26L; //when final List actual = notificationRepository.findAllByReceiverId(receiverId);