From 255c726f20254112e6459d58a979f0a136ad2503 Mon Sep 17 00:00:00 2001 From: XiangRongLin <41164160+XiangRongLin@users.noreply.github.com> Date: Sun, 10 Jan 2021 20:27:34 +0100 Subject: [PATCH] Add resource path base to DownloaderFactory --- .../java/org/schabi/newpipe/downloader/DownloaderFactory.java | 2 ++ .../services/youtube/YoutubeMixPlaylistExtractorTest.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/extractor/src/test/java/org/schabi/newpipe/downloader/DownloaderFactory.java b/extractor/src/test/java/org/schabi/newpipe/downloader/DownloaderFactory.java index 96cbc6621..4dd996f38 100644 --- a/extractor/src/test/java/org/schabi/newpipe/downloader/DownloaderFactory.java +++ b/extractor/src/test/java/org/schabi/newpipe/downloader/DownloaderFactory.java @@ -6,6 +6,8 @@ import java.io.IOException; public class DownloaderFactory { + public final static String RESOURCE_PATH = "src/test/resources/org/schabi/newpipe/extractor/"; + private final static DownloaderType DEFAULT_DOWNLOADER = DownloaderType.REAL; public Downloader getDownloader(String path) throws IOException { diff --git a/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeMixPlaylistExtractorTest.java b/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeMixPlaylistExtractorTest.java index 689b3329c..9d42b1bce 100644 --- a/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeMixPlaylistExtractorTest.java +++ b/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeMixPlaylistExtractorTest.java @@ -43,7 +43,7 @@ public class YoutubeMixPlaylistExtractorTest { private static final String VIDEO_ID = "_AzeUSL9lZc"; private static final String VIDEO_TITLE = "Most Beautiful And Emotional Piano: Anime Music Shigatsu wa Kimi no Uso OST IMO"; - private static final String RESOURCE_PATH = "src/test/resources/org/schabi/newpipe/extractor/services/youtube/mix/"; + private static final String RESOURCE_PATH = DownloaderFactory.RESOURCE_PATH + "services/youtube/mix/"; private static final Map dummyCookie = Collections.singletonMap(YoutubeMixPlaylistExtractor.COOKIE_NAME, "whatever");