Move test mp3s to androidTest directory
This commit is contained in:
parent
0fbc6992a1
commit
0e96df3cba
|
@ -85,7 +85,7 @@ public class PlaybackServiceMediaPlayerTest {
|
|||
assertTrue(cacheDir.canWrite());
|
||||
assertTrue(cacheDir.canRead());
|
||||
if (!dest.exists()) {
|
||||
InputStream i = getInstrumentation().getTargetContext().getAssets().open("3sec.mp3");
|
||||
InputStream i = getInstrumentation().getContext().getAssets().open("3sec.mp3");
|
||||
OutputStream o = new FileOutputStream(new File(cacheDir, PLAYABLE_DEST_URL));
|
||||
IOUtils.copy(i, o);
|
||||
o.flush();
|
||||
|
|
|
@ -2,6 +2,9 @@ package de.test.antennapod.ui;
|
|||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
|
||||
import de.danoeh.antennapod.event.FeedListUpdateEvent;
|
||||
import de.danoeh.antennapod.event.QueueEvent;
|
||||
import de.danoeh.antennapod.model.feed.Feed;
|
||||
|
@ -99,7 +102,8 @@ public class UITestUtils {
|
|||
}
|
||||
Assert.assertFalse(mediaFile.exists());
|
||||
|
||||
InputStream in = context.getAssets().open(testFileName);
|
||||
InputStream in = InstrumentationRegistry.getInstrumentation().getContext()
|
||||
.getAssets().open(testFileName);
|
||||
Assert.assertNotNull(in);
|
||||
|
||||
FileOutputStream out = new FileOutputStream(mediaFile);
|
||||
|
|
Loading…
Reference in New Issue