Skip to content

Commit 0b34559

Browse files
committed
Fix IsPlayingAllTypeOfContentTest compilation
1 parent 6ff0219 commit 0b34559

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
@@ -35,6 +36,7 @@ class IsPlayingAllTypeOfContentTest(
3536
type = Default,
3637
) {
3738
clock(FakeClock(true))
39+
coroutineContext(EmptyCoroutineContext)
3840
}
3941
}
4042

@@ -47,7 +49,7 @@ class IsPlayingAllTypeOfContentTest(
4749

4850
@Test
4951
fun `is playing`() {
50-
player.addMediaItem(MediaItem.fromUri(urlToTest))
52+
player.setMediaItem(MediaItem.fromUri(urlToTest))
5153
player.prepare()
5254
player.play()
5355

@@ -60,32 +62,21 @@ class IsPlayingAllTypeOfContentTest(
6062
}
6163

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

0 commit comments

Comments
 (0)