Skip to content

Commit 380956a

Browse files
committed
Fix IsPlayingAllTypeOfContentTest compilation
1 parent af05da6 commit 380956a

File tree

1 file changed

+13
-22
lines changed

1 file changed

+13
-22
lines changed

pillarbox-player/src/test/java/ch/srgssr/pillarbox/player/IsPlayingAllTypeOfContentTest.kt

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import org.junit.runner.RunWith
1515
import org.robolectric.ParameterizedRobolectricTestRunner
1616
import org.robolectric.ParameterizedRobolectricTestRunner.Parameters
1717
import org.robolectric.Shadows.shadowOf
18+
import kotlin.coroutines.EmptyCoroutineContext
1819
import kotlin.test.AfterTest
1920
import kotlin.test.BeforeTest
2021
import kotlin.test.Test
@@ -33,6 +34,7 @@ class IsPlayingAllTypeOfContentTest(
3334
player = PillarboxExoPlayer(
3435
context = ApplicationProvider.getApplicationContext(),
3536
clock = FakeClock(true),
37+
coroutineContext = EmptyCoroutineContext,
3638
)
3739
}
3840

@@ -45,7 +47,7 @@ class IsPlayingAllTypeOfContentTest(
4547

4648
@Test
4749
fun `is playing`() {
48-
player.addMediaItem(MediaItem.fromUri(urlToTest))
50+
player.setMediaItem(MediaItem.fromUri(urlToTest))
4951
player.prepare()
5052
player.play()
5153

@@ -58,32 +60,21 @@ class IsPlayingAllTypeOfContentTest(
5860
}
5961

6062
companion object {
61-
// From urn:swi:video:48940210
62-
private const val VOD_MP4 =
63-
"https://cdn.prod.swi-services.ch/video-projects/141b30ce-3850-424b-9063-a20d5619d342/localised-videos/ENG/renditions/ENG.mp4"
64-
private const val VOD_HLS = "https://rts-vod-amd.akamaized.net/ww/14970442/7510ee63-05a4-3d48-8d26-1f1b3a82f6be/master.m3u8"
65-
private const val AOD_MP3 = "https://srfaudio-a.akamaihd.net/delivery/world/af671f12-6f17-415a-9dd8-b8aee24cce8b.mp3"
66-
private const val VOD_DASH_H264 = "https://storage.googleapis.com/wvmedia/clear/h264/tears/tears.mpd"
67-
private const val VOD_DASH_H265 = "https://storage.googleapis.com/wvmedia/clear/hevc/tears/tears.mpd"
68-
private const val LIVE_HLS = "https://rtsc3video.akamaized.net/hls/live/2042837/c3video/3/playlist.m3u8?dw=0"
69-
private const val LIVE_DVR_HLS = "https://rtsc3video.akamaized.net/hls/live/2042837/c3video/3/playlist.m3u8"
70-
private const val AUDIO_LIVE_MP3 = "https://stream.srg-ssr.ch/m/la-1ere/mp3_128"
71-
private const val AUDIO_LIVE_DVR_HLS = "https://lsaplus.swisstxt.ch/audio/couleur3_96.stream/playlist.m3u8"
72-
7363
@JvmStatic
7464
@Suppress("unused")
7565
@Parameters(name = "{index}: {0}")
7666
fun parameters(): Iterable<Any> {
7767
return listOf(
78-
VOD_MP4,
79-
VOD_HLS,
80-
AOD_MP3,
81-
VOD_DASH_H264,
82-
VOD_DASH_H265,
83-
LIVE_HLS,
84-
LIVE_DVR_HLS,
85-
AUDIO_LIVE_MP3,
86-
AUDIO_LIVE_DVR_HLS,
68+
// From urn:swi:video:48940210
69+
"https://cdn.prod.swi-services.ch/video-projects/141b30ce-3850-424b-9063-a20d5619d342/localised-videos/ENG/renditions/ENG.mp4",
70+
"https://rts-vod-amd.akamaized.net/ww/14970442/7510ee63-05a4-3d48-8d26-1f1b3a82f6be/master.m3u8",
71+
"https://srfaudio-a.akamaihd.net/delivery/world/af671f12-6f17-415a-9dd8-b8aee24cce8b.mp3",
72+
"https://storage.googleapis.com/wvmedia/clear/h264/tears/tears.mpd",
73+
"https://storage.googleapis.com/wvmedia/clear/hevc/tears/tears.mpd",
74+
"https://rtsc3video.akamaized.net/hls/live/2042837/c3video/3/playlist.m3u8?dw=0",
75+
"https://rtsc3video.akamaized.net/hls/live/2042837/c3video/3/playlist.m3u8",
76+
"https://stream.srg-ssr.ch/m/la-1ere/mp3_128",
77+
"https://lsaplus.swisstxt.ch/audio/couleur3_96.stream/playlist.m3u8",
8778
)
8879
}
8980
}

0 commit comments

Comments
 (0)