Skip to content

Commit

Permalink
NABI-123--refactor : 변수명 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-june committed Nov 8, 2023
1 parent 5d0b977 commit 17d5baa
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ class CardRepositoryTest {
@Autowired
private ItemRepository itemRepository;

private static Long userChoiId = 1L;
private static Long userId = 1L;

@BeforeAll
void suggestionUserSetting() {
User userChoi = User.builder()
User user = User.builder()
.accountId("c")
.nickname("choi")
.imageUrl("xxx")
.provider("KAKAO")
.role("ROLE_USER")
.build();
ReflectionTestUtils.setField(userChoi, "userId", userChoiId);
userRepository.save(userChoi);
ReflectionTestUtils.setField(user, "userId", userId);
userRepository.save(user);

Category category = new Category(CategoryEnum.ELECTRONICS);
categoryRepository.save(category);
Expand All @@ -76,7 +76,7 @@ void suggestionUserSetting() {
.poke(true)
.tradeType(TradeType.DIRECT_DEALING)
.item(itemFromChoiUnder)
.user(userChoi)
.user(user)
.build();
ReflectionTestUtils.setField(cardFromChoiUnder, "cardId", 1L);

Expand All @@ -98,7 +98,7 @@ void suggestionUserSetting() {
.poke(true)
.tradeType(TradeType.DIRECT_DEALING)
.item(itemFromChoiOver)
.user(userChoi)
.user(user)
.build();
ReflectionTestUtils.setField(cardFromChoiOver, "cardId", 2L);

Expand All @@ -109,7 +109,7 @@ void suggestionUserSetting() {
@Test
void 제안_가능한_카드_조회_찔러보기_허용인_경우() {
// given
Long suggestionUserId = userChoiId; // 제안하고 있는 유저 id
Long suggestionUserId = userId; // 제안하고 있는 유저 id

// 제안 대상이 되는 카드의 정보
PriceRange targetCardPriceRange = PriceRange.PRICE_RANGE_FOUR;
Expand Down Expand Up @@ -154,7 +154,7 @@ void suggestionUserSetting() {
@Test
void 제안_가능한_카드_조회_찔러보기_불가인_경우() {
// given
Long suggestionUserId = userChoiId; // 제안하고 있는 유저 id
Long suggestionUserId = userId; // 제안하고 있는 유저 id

// 제안 대상이 되는 카드의 정보
PriceRange targetCardPriceRange = PriceRange.PRICE_RANGE_FOUR;
Expand Down

0 comments on commit 17d5baa

Please sign in to comment.