From 676622f6dfbabab9e6b3950c5de315a90f30d822 Mon Sep 17 00:00:00 2001 From: AudricV <74829229+AudricV@users.noreply.github.com> Date: Sun, 29 Jan 2023 01:08:02 +0100 Subject: [PATCH] [SoundCloud] Fix expectedLikeCountAtLeast tests of SoundcloudStreamExtractorTest test classes As like count is now returned by the extractor, we need to assert a positive minimum like count, which is close to the actual value, in order to avoid test failures due to lower like counts than the ones excepted. --- .../soundcloud/SoundcloudStreamExtractorTest.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/extractor/src/test/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudStreamExtractorTest.java b/extractor/src/test/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudStreamExtractorTest.java index da2c0511d..fd0de8604 100644 --- a/extractor/src/test/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudStreamExtractorTest.java +++ b/extractor/src/test/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudStreamExtractorTest.java @@ -22,7 +22,8 @@ import java.util.List; import javax.annotation.Nullable; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertSame; import static org.schabi.newpipe.extractor.ServiceList.SoundCloud; public class SoundcloudStreamExtractorTest { @@ -64,7 +65,7 @@ public class SoundcloudStreamExtractorTest { @Override public long expectedViewCountAtLeast() { return 43000; } @Nullable @Override public String expectedUploadDate() { return "2019-05-16 16:28:45.000"; } @Nullable @Override public String expectedTextualUploadDate() { return "2019-05-16 16:28:45"; } - @Override public long expectedLikeCountAtLeast() { return -1; } + @Override public long expectedLikeCountAtLeast() { return 600; } @Override public long expectedDislikeCountAtLeast() { return -1; } @Override public boolean expectedHasAudioStreams() { return false; } @Override public boolean expectedHasVideoStreams() { return false; } @@ -127,7 +128,7 @@ public class SoundcloudStreamExtractorTest { @Override public long expectedViewCountAtLeast() { return 386000; } @Nullable @Override public String expectedUploadDate() { return "2016-11-11 01:16:37.000"; } @Nullable @Override public String expectedTextualUploadDate() { return "2016-11-11 01:16:37"; } - @Override public long expectedLikeCountAtLeast() { return -1; } + @Override public long expectedLikeCountAtLeast() { return 7350; } @Override public long expectedDislikeCountAtLeast() { return -1; } @Override public boolean expectedHasAudioStreams() { return false; } @Override public boolean expectedHasVideoStreams() { return false; } @@ -170,7 +171,7 @@ public class SoundcloudStreamExtractorTest { @Override public long expectedViewCountAtLeast() { return 27000; } @Nullable @Override public String expectedUploadDate() { return "2019-03-28 13:36:18.000"; } @Nullable @Override public String expectedTextualUploadDate() { return "2019-03-28 13:36:18"; } - @Override public long expectedLikeCountAtLeast() { return -1; } + @Override public long expectedLikeCountAtLeast() { return 25; } @Override public long expectedDislikeCountAtLeast() { return -1; } @Override public boolean expectedHasVideoStreams() { return false; } @Override public boolean expectedHasSubtitles() { return false; }