Skip to content

Commit

Permalink
refactor(thumbsup): Assertions import 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobhboy committed Apr 30, 2024
1 parent 844b1e0 commit db88cc8
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.project.bumawiki.domain.thumbsup.service;

import static org.assertj.core.api.Assertions.*;
import static org.junit.jupiter.api.Assertions.*;

import java.util.List;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.RepeatedTest;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -85,9 +85,9 @@ class 문서_좋아하는지_확인 {
thumbsUpRepository.save(new ThumbsUp(user, docs));
boolean shouldTrue = queryThumbsUpService.checkUserLikeThisDocs(docs.getId(), user);
//then
Assertions.assertAll(
() -> Assertions.assertFalse(shouldFalse),
() -> Assertions.assertTrue(shouldTrue)
assertAll(
() -> assertFalse(shouldFalse),
() -> assertTrue(shouldTrue)
);
}

Expand All @@ -99,7 +99,7 @@ class 문서_좋아하는지_확인 {
userRepository.save(user);

//when, then
BumawikiException bumawikiException = Assertions.assertThrows(BumawikiException.class,
BumawikiException bumawikiException = assertThrows(BumawikiException.class,
() -> queryThumbsUpService.checkUserLikeThisDocs(docsId, user));

assertThat(bumawikiException.getErrorCode()).isEqualTo(ErrorCode.DOCS_NOT_FOUND);
Expand Down

0 comments on commit db88cc8

Please sign in to comment.