From 11d3aeb0dd67605553538932a857675ffd9583d3 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Wed, 24 Feb 2016 22:36:16 +0100 Subject: [PATCH] fixed faling searchengine unittest --- .../newpipe/extractor/youtube/YoutubeSearchEngineTest.java | 2 +- .../extractor/services/youtube/YoutubeSearchEngine.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/androidTest/java/org/schabi/newpipe/extractor/youtube/YoutubeSearchEngineTest.java b/app/src/androidTest/java/org/schabi/newpipe/extractor/youtube/YoutubeSearchEngineTest.java index a0c888f35..ed6d17aae 100644 --- a/app/src/androidTest/java/org/schabi/newpipe/extractor/youtube/YoutubeSearchEngineTest.java +++ b/app/src/androidTest/java/org/schabi/newpipe/extractor/youtube/YoutubeSearchEngineTest.java @@ -38,7 +38,7 @@ public class YoutubeSearchEngineTest extends AndroidTestCase { super.setUp(); SearchEngine engine = new YoutubeSearchEngine(); - result = engine.search("https://www.youtube.com/results?search_query=bla", + result = engine.search("bla", 0, "de", new Downloader()); suggestionReply = engine.suggestionList("hello","de",new Downloader()); } diff --git a/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeSearchEngine.java b/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeSearchEngine.java index 5165814bb..ed0b09036 100644 --- a/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeSearchEngine.java +++ b/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeSearchEngine.java @@ -246,6 +246,9 @@ public class YoutubeSearchEngine implements SearchEngine { .replace(".", "") .replace(",", ""); + if(Long.parseLong(output) == 30) { + Log.d(TAG, "bla"); + } return Long.parseLong(output); }