Skip to content

Commit

Permalink
test : receiverId 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
java-saeng committed Oct 1, 2023
1 parent 4d5176b commit 77baab3
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class NotificationRepositoryTest extends JpaRepositorySliceTestHelper {
private NotificationRepository notificationRepository;

private Notification notification1, notification2, notification3;
private Long receiverId = 26L;

@BeforeEach
void setUp() {
Expand All @@ -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)
);
}
Expand All @@ -60,6 +59,7 @@ void setUp() {
void test_findAllByReceiverId() throws Exception {
//given
final List<Notification> expect = List.of(notification1, notification2);
final long receiverId = 26L;

//when
final List<Notification> actual = notificationRepository.findAllByReceiverId(receiverId);
Expand Down

0 comments on commit 77baab3

Please sign in to comment.