From 4c1efedf2b9440b1a8944b4199693983fcc82d6d Mon Sep 17 00:00:00 2001 From: 70825 Date: Thu, 27 Jul 2023 17:59:42 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20Service=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=EC=97=90=EB=8F=84=20DataCleaner=20=EC=B6=94=EA=B0=80=ED=95=98?= =?UTF-8?q?=EC=97=AC=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EA=B2=A9=EB=A6=AC=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../member/persistence/ReviewFavoriteRepositoryTest.java | 6 ++++++ .../com/funeat/review/application/ReviewServiceTest.java | 3 +++ 2 files changed, 9 insertions(+) diff --git a/backend/src/test/java/com/funeat/member/persistence/ReviewFavoriteRepositoryTest.java b/backend/src/test/java/com/funeat/member/persistence/ReviewFavoriteRepositoryTest.java index 93498b8d1..cf396b140 100644 --- a/backend/src/test/java/com/funeat/member/persistence/ReviewFavoriteRepositoryTest.java +++ b/backend/src/test/java/com/funeat/member/persistence/ReviewFavoriteRepositoryTest.java @@ -2,6 +2,8 @@ import static org.assertj.core.api.Assertions.assertThat; +import com.funeat.common.DataCleaner; +import com.funeat.common.DataClearExtension; import com.funeat.member.domain.Member; import com.funeat.member.domain.favorite.ReviewFavorite; import com.funeat.product.domain.Product; @@ -13,10 +15,14 @@ import org.junit.jupiter.api.DisplayNameGeneration; import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; +import org.springframework.context.annotation.Import; @DataJpaTest +@Import(DataCleaner.class) +@ExtendWith(DataClearExtension.class) @SuppressWarnings("NonAsciiCharacters") @DisplayNameGeneration(ReplaceUnderscores.class) class ReviewFavoriteRepositoryTest { diff --git a/backend/src/test/java/com/funeat/review/application/ReviewServiceTest.java b/backend/src/test/java/com/funeat/review/application/ReviewServiceTest.java index 4465ec52a..6ee9b1365 100644 --- a/backend/src/test/java/com/funeat/review/application/ReviewServiceTest.java +++ b/backend/src/test/java/com/funeat/review/application/ReviewServiceTest.java @@ -3,6 +3,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores; +import com.funeat.common.DataClearExtension; import com.funeat.member.domain.Member; import com.funeat.member.domain.favorite.ReviewFavorite; import com.funeat.member.persistence.MemberRepository; @@ -24,6 +25,7 @@ import org.junit.jupiter.api.DisplayNameGeneration; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.data.domain.PageRequest; @@ -33,6 +35,7 @@ @Transactional @SpringBootTest +@ExtendWith(DataClearExtension.class) @SuppressWarnings("NonAsciiCharacters") @DisplayNameGeneration(ReplaceUnderscores.class) class ReviewServiceTest {