1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-12-21 08:09:38 +01:00

fixed Downloader.getInstance() in unit tests

This commit is contained in:
Christian Schabesberger 2016-12-24 17:11:29 +01:00
parent 3767a96e0f
commit 38c5cb50fb
7 changed files with 8 additions and 8 deletions

View File

@ -32,7 +32,7 @@ public class YoutubeChannelExtractorTest extends AndroidTestCase {
@Override
public void setUp() throws Exception {
super.setUp();
NewPipe.init(new Downloader());
NewPipe.init(Downloader.getInstance());
extractor = NewPipe.getService("Youtube")
.getChannelExtractorInstance("https://www.youtube.com/channel/UCYJ61XIK64sp6ZFFS8sctxw", 0);
}

View File

@ -35,7 +35,7 @@ public class YoutubeSearchEngineTest extends AndroidTestCase {
@Override
public void setUp() throws Exception {
super.setUp();
NewPipe.init(new Downloader());
NewPipe.init(Downloader.getInstance());
SearchEngine engine = NewPipe.getService("Youtube").getSearchEngineInstance();
result = engine.search("this is something boring", 0, "de").getSearchResult();

View File

@ -38,7 +38,7 @@ public class YoutubeSearchResultTest extends AndroidTestCase {
@Override
public void setUp() throws Exception {
super.setUp();
NewPipe.init(new Downloader());
NewPipe.init(Downloader.getInstance());
SuggestionExtractor engine = new YoutubeSuggestionExtractor(0);
suggestionReply = engine.suggestionList("hello", "de");
}

View File

@ -38,7 +38,7 @@ public class YoutubeStreamExtractorDefaultTest extends AndroidTestCase {
public void setUp() throws Exception {
super.setUp();
NewPipe.init(new Downloader());
NewPipe.init(Downloader.getInstance());
extractor = NewPipe.getService("Youtube")
.getExtractorInstance("https://www.youtube.com/watch?v=YQHsXMglC9A");
}

View File

@ -39,7 +39,7 @@ public class YoutubeStreamExtractorGemaTest extends AndroidTestCase {
public void testGemaError() throws IOException, ExtractionException {
if(testActive) {
try {
NewPipe.init(new Downloader());
NewPipe.init(Downloader.getInstance());
NewPipe.getService("Youtube")
.getExtractorInstance("https://www.youtube.com/watch?v=3O1_3zBUKM8");
} catch(YoutubeStreamExtractor.GemaException ge) {

View File

@ -38,9 +38,9 @@ public class YoutubeStreamExtractorLiveStreamTest extends AndroidTestCase {
//todo: make the extractor not throw over a livestream
/*
NewPipe.init(new Downloader());
NewPipe.init(Downloader.getInstance());
extractor = NewPipe.getService("Youtube")
.getExtractorInstance("https://www.youtube.com/watch?v=J0s6NjqdjLE", new Downloader());
.getExtractorInstance("https://www.youtube.com/watch?v=J0s6NjqdjLE", Downloader.getInstance());
*/
}

View File

@ -17,7 +17,7 @@ public class YoutubeStreamExtractorRestrictedTest extends AndroidTestCase {
public void setUp() throws Exception {
super.setUp();
NewPipe.init(new Downloader());
NewPipe.init(Downloader.getInstance());
extractor = NewPipe.getService("Youtube")
.getExtractorInstance("https://www.youtube.com/watch?v=i6JTvzrpBy0");
}