diff --git a/src/main/java/team7/inplace/video/domain/Video.java b/src/main/java/team7/inplace/video/domain/Video.java index a645b55b..9fd4ab1a 100644 --- a/src/main/java/team7/inplace/video/domain/Video.java +++ b/src/main/java/team7/inplace/video/domain/Video.java @@ -1,14 +1,19 @@ package team7.inplace.video.domain; -import jakarta.persistence.*; +import static jakarta.persistence.GenerationType.IDENTITY; +import static lombok.AccessLevel.PROTECTED; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; import lombok.Getter; import lombok.NoArgsConstructor; import team7.inplace.influencer.domain.Influencer; import team7.inplace.place.domain.Place; -import static jakarta.persistence.GenerationType.IDENTITY; -import static lombok.AccessLevel.PROTECTED; - @Entity @Getter @NoArgsConstructor(access = PROTECTED) @@ -54,7 +59,7 @@ public String getVideoUUID() { public void updateViewCount(Long viewCount) { if (this.viewCount == -1L) { this.viewCount = viewCount; - this.viewCountIncrease = viewCount; + this.viewCountIncrease = 0L; return; } diff --git a/src/test/java/team7/inplace/crawling/application/AddressUtilTest.java b/src/test/java/team7/inplace/crawling/application/AddressUtilTest.java index 4d0d0652..bc552fe0 100644 --- a/src/test/java/team7/inplace/crawling/application/AddressUtilTest.java +++ b/src/test/java/team7/inplace/crawling/application/AddressUtilTest.java @@ -1,11 +1,11 @@ package team7.inplace.crawling.application; +import static org.junit.jupiter.api.Assertions.assertEquals; + import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import team7.inplace.admin.crawling.application.AddressUtil; -import static org.junit.jupiter.api.Assertions.assertEquals; - class AddressUtilTest { @DisplayName("주소 추출 테스트 1") @@ -16,7 +16,7 @@ void extractAddressFromJsonNodeTest1() { [참조은 생고기] 대구 북구 복현로 78 (복현2동 266-9) """; - final String address = "대구 북구 복현로 78"; + final String address = "복현로 78"; // when String result = AddressUtil.extractAddressFromString(description); diff --git a/src/test/java/team7/inplace/crawling/client/YoutubeClientTest.java b/src/test/java/team7/inplace/crawling/client/YoutubeClientTest.java index 4f8f16bd..8ea6ee93 100644 --- a/src/test/java/team7/inplace/crawling/client/YoutubeClientTest.java +++ b/src/test/java/team7/inplace/crawling/client/YoutubeClientTest.java @@ -1,5 +1,7 @@ package team7.inplace.crawling.client; +import static org.assertj.core.api.Assertions.assertThat; + import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -7,8 +9,6 @@ import org.springframework.test.context.ActiveProfiles; import team7.inplace.admin.crawling.client.YoutubeClient; -import static org.assertj.core.api.Assertions.assertThat; - @SpringBootTest @ActiveProfiles("test") class YoutubeClientTest { @@ -22,9 +22,9 @@ void crawlingTest() { final String videoId = null; var response = youtubeClient.getVideos(playlistId, videoId); - // 2024. 10. 2기준 154개 + // 2024. 11. 15일기준 157개 // regex로 판별되는 기준 138개 - final int expectedSize = 154; + final int expectedSize = 157; assertThat(response.size()) .isEqualTo(expectedSize); }