From 86bb9efb5de618800cfe948a56e8edf0b7a026f5 Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Fri, 21 May 2021 19:52:07 +0200 Subject: [PATCH] Added likeCount back to tests --- .../services/bandcamp/BandcampCommentsExtractorTest.java | 4 +++- .../services/peertube/PeertubeCommentsExtractorTest.java | 1 + .../services/youtube/YoutubeCommentsExtractorTest.java | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/extractor/src/test/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampCommentsExtractorTest.java b/extractor/src/test/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampCommentsExtractorTest.java index f861ba2e1..37d2aa967 100644 --- a/extractor/src/test/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampCommentsExtractorTest.java +++ b/extractor/src/test/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampCommentsExtractorTest.java @@ -13,8 +13,9 @@ import org.schabi.newpipe.extractor.utils.Utils; import java.io.IOException; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import static org.schabi.newpipe.extractor.ServiceList.Bandcamp; public class BandcampCommentsExtractorTest { @@ -45,6 +46,7 @@ public class BandcampCommentsExtractorTest { assertFalse(Utils.isBlank(c.getName())); assertFalse(Utils.isBlank(c.getThumbnailUrl())); assertFalse(Utils.isBlank(c.getUrl())); + assertEquals(-1, c.getLikeCount()); assertTrue(Utils.isBlank(c.getTextualVoteCount())); } } diff --git a/extractor/src/test/java/org/schabi/newpipe/extractor/services/peertube/PeertubeCommentsExtractorTest.java b/extractor/src/test/java/org/schabi/newpipe/extractor/services/peertube/PeertubeCommentsExtractorTest.java index 7bd81f665..87fe6a500 100644 --- a/extractor/src/test/java/org/schabi/newpipe/extractor/services/peertube/PeertubeCommentsExtractorTest.java +++ b/extractor/src/test/java/org/schabi/newpipe/extractor/services/peertube/PeertubeCommentsExtractorTest.java @@ -75,6 +75,7 @@ public class PeertubeCommentsExtractorTest { assertFalse(Utils.isBlank(c.getTextualUploadDate())); assertFalse(Utils.isBlank(c.getThumbnailUrl())); assertFalse(Utils.isBlank(c.getUrl())); + assertEquals(-1, c.getLikeCount()); assertTrue(Utils.isBlank(c.getTextualVoteCount())); } } diff --git a/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeCommentsExtractorTest.java b/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeCommentsExtractorTest.java index 07152facc..471a3f677 100644 --- a/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeCommentsExtractorTest.java +++ b/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeCommentsExtractorTest.java @@ -98,6 +98,7 @@ public class YoutubeCommentsExtractorTest { assertNotNull(c.getUploadDate()); assertFalse(Utils.isBlank(c.getThumbnailUrl())); assertFalse(Utils.isBlank(c.getUrl())); + assertTrue(c.getLikeCount() >= 0); assertFalse(Utils.isBlank(c.getTextualVoteCount())); } } @@ -148,6 +149,7 @@ public class YoutubeCommentsExtractorTest { assertNotNull(c.getUploadDate()); assertFalse(Utils.isBlank(c.getThumbnailUrl())); assertFalse(Utils.isBlank(c.getUrl())); + assertTrue(c.getLikeCount() >= 0); assertFalse(Utils.isBlank(c.getTextualVoteCount())); if (c.getCommentId().equals("Ugga_h1-EXdHB3gCoAEC")) { // comment without text assertTrue(Utils.isBlank(c.getCommentText())); @@ -191,6 +193,7 @@ public class YoutubeCommentsExtractorTest { assertNotNull(c.getUploadDate()); assertFalse(Utils.isBlank(c.getThumbnailUrl())); assertFalse(Utils.isBlank(c.getUrl())); + assertTrue(c.getLikeCount() >= 0); assertFalse(Utils.isBlank(c.getTextualVoteCount())); assertFalse(Utils.isBlank(c.getCommentText())); if (c.isHeartedByUploader()) { @@ -233,6 +236,7 @@ public class YoutubeCommentsExtractorTest { assertFalse(Utils.isBlank(c.getThumbnailUrl())); assertFalse(Utils.isBlank(c.getUrl())); assertFalse(Utils.isBlank(c.getTextualVoteCount())); + assertTrue(c.getLikeCount() >= 0); assertFalse(Utils.isBlank(c.getCommentText())); }