Skip to content

Commit 86bb9ef

Browse files
committed
Added likeCount back to tests
1 parent 46654f5 commit 86bb9ef

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

extractor/src/test/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampCommentsExtractorTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313

1414
import java.io.IOException;
1515

16-
import static org.junit.Assert.*;
16+
import static org.junit.Assert.assertEquals;
1717
import static org.junit.Assert.assertFalse;
18+
import static org.junit.Assert.assertTrue;
1819
import static org.schabi.newpipe.extractor.ServiceList.Bandcamp;
1920

2021
public class BandcampCommentsExtractorTest {
@@ -45,6 +46,7 @@ public void testGetCommentsAllData() throws IOException, ExtractionException {
4546
assertFalse(Utils.isBlank(c.getName()));
4647
assertFalse(Utils.isBlank(c.getThumbnailUrl()));
4748
assertFalse(Utils.isBlank(c.getUrl()));
49+
assertEquals(-1, c.getLikeCount());
4850
assertTrue(Utils.isBlank(c.getTextualVoteCount()));
4951
}
5052
}

extractor/src/test/java/org/schabi/newpipe/extractor/services/peertube/PeertubeCommentsExtractorTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public void testGetCommentsAllData() throws IOException, ExtractionException {
7575
assertFalse(Utils.isBlank(c.getTextualUploadDate()));
7676
assertFalse(Utils.isBlank(c.getThumbnailUrl()));
7777
assertFalse(Utils.isBlank(c.getUrl()));
78+
assertEquals(-1, c.getLikeCount());
7879
assertTrue(Utils.isBlank(c.getTextualVoteCount()));
7980
}
8081
}

extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeCommentsExtractorTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ public void testGetCommentsAllData() throws IOException, ExtractionException {
9898
assertNotNull(c.getUploadDate());
9999
assertFalse(Utils.isBlank(c.getThumbnailUrl()));
100100
assertFalse(Utils.isBlank(c.getUrl()));
101+
assertTrue(c.getLikeCount() >= 0);
101102
assertFalse(Utils.isBlank(c.getTextualVoteCount()));
102103
}
103104
}
@@ -148,6 +149,7 @@ public void testGetCommentsAllData() throws IOException, ExtractionException {
148149
assertNotNull(c.getUploadDate());
149150
assertFalse(Utils.isBlank(c.getThumbnailUrl()));
150151
assertFalse(Utils.isBlank(c.getUrl()));
152+
assertTrue(c.getLikeCount() >= 0);
151153
assertFalse(Utils.isBlank(c.getTextualVoteCount()));
152154
if (c.getCommentId().equals("Ugga_h1-EXdHB3gCoAEC")) { // comment without text
153155
assertTrue(Utils.isBlank(c.getCommentText()));
@@ -191,6 +193,7 @@ public void testGetCommentsAllData() throws IOException, ExtractionException {
191193
assertNotNull(c.getUploadDate());
192194
assertFalse(Utils.isBlank(c.getThumbnailUrl()));
193195
assertFalse(Utils.isBlank(c.getUrl()));
196+
assertTrue(c.getLikeCount() >= 0);
194197
assertFalse(Utils.isBlank(c.getTextualVoteCount()));
195198
assertFalse(Utils.isBlank(c.getCommentText()));
196199
if (c.isHeartedByUploader()) {
@@ -233,6 +236,7 @@ public void testGetCommentsAllData() throws IOException, ExtractionException {
233236
assertFalse(Utils.isBlank(c.getThumbnailUrl()));
234237
assertFalse(Utils.isBlank(c.getUrl()));
235238
assertFalse(Utils.isBlank(c.getTextualVoteCount()));
239+
assertTrue(c.getLikeCount() >= 0);
236240
assertFalse(Utils.isBlank(c.getCommentText()));
237241
}
238242

0 commit comments

Comments
 (0)