From b5dfa160acd79885491b0e4713c51d9e733cf35e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=84=EC=A2=85=EB=AF=BC?= Date: Tue, 16 Jan 2024 23:52:11 +0900 Subject: [PATCH] [FIX] added fields --- .../AuctionHistoryRepositoryTests.java | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/test/java/com/dailyon/auctionservice/repository/AuctionHistoryRepositoryTests.java b/src/test/java/com/dailyon/auctionservice/repository/AuctionHistoryRepositoryTests.java index 93306fe..9c85a83 100644 --- a/src/test/java/com/dailyon/auctionservice/repository/AuctionHistoryRepositoryTests.java +++ b/src/test/java/com/dailyon/auctionservice/repository/AuctionHistoryRepositoryTests.java @@ -56,13 +56,15 @@ void auctionHistoryCreateTest() { 1L, "img.png", "name", + 1L, + "size", true, 10000L, 1000L, 1000L ); - AuctionHistory savedHistory = auctionHistoryRepository.save(history); + Assertions.assertDoesNotThrow(() -> auctionHistoryRepository.save(history)); } @Test @@ -70,29 +72,29 @@ void auctionHistoryCreateTest() { void findAuctionHistoryListTests() { List histories = List.of( AuctionHistory.create( - "1", "TEST", 1L, "img.png", "name", - true, 10000L, 1000L, 1000L + "1", "TEST", 1L, "img.png", "name", 1L, + "size", true, 10000L, 1000L, 1000L ), AuctionHistory.create( - "1", "TEST2", 2L, "img.png", "name", - false, 0L, 100L, 10000L + "1", "TEST2", 2L, "img.png", "name", 1L, + "size", false, 0L, 100L, 10000L ), AuctionHistory.create( - "1", "TEST3", 3L, "img.png", "name", - false, 0L, 1000L, 10000L + "1", "TEST3", 3L, "img.png", "name", 1L, + "size", false, 0L, 1000L, 10000L ), AuctionHistory.create( - "2", "TEST", 1L, "img.png", "name", - true, 10000L, 1000L, 1000L + "2", "TEST", 1L, "img.png", "name", 1L, + "size", true, 10000L, 1000L, 1000L ), AuctionHistory.create( - "2", "TEST2", 2L, "img.png", "name", - false, 0L, 100L, 10000L + "2", "TEST2", 2L, "img.png", "name", 1L, + "size", false, 0L, 100L, 10000L ) ); auctionHistoryRepository.saveAll(histories); - List byMemberId = auctionHistoryRepository.findByMemberId(String.valueOf(1L)); + List byMemberId = auctionHistoryRepository.findByMemberId("1"); Assertions.assertEquals(3, byMemberId.size()); }