Skip to content

Commit

Permalink
[FIX] added fields
Browse files Browse the repository at this point in the history
  • Loading branch information
wakkpu committed Jan 16, 2024
1 parent ed5023b commit b5dfa16
Showing 1 changed file with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,43 +56,45 @@ void auctionHistoryCreateTest() {
1L,
"img.png",
"name",
1L,
"size",
true,
10000L,
1000L,
1000L
);

AuctionHistory savedHistory = auctionHistoryRepository.save(history);
Assertions.assertDoesNotThrow(() -> auctionHistoryRepository.save(history));
}

@Test
@DisplayName("경매 내역 리스트 조회")
void findAuctionHistoryListTests() {
List<AuctionHistory> 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<AuctionHistory> byMemberId = auctionHistoryRepository.findByMemberId(String.valueOf(1L));
List<AuctionHistory> byMemberId = auctionHistoryRepository.findByMemberId("1");

Assertions.assertEquals(3, byMemberId.size());
}
Expand Down

0 comments on commit b5dfa16

Please sign in to comment.