@@ -15,6 +15,7 @@ import org.junit.runner.RunWith
15
15
import org.robolectric.ParameterizedRobolectricTestRunner
16
16
import org.robolectric.ParameterizedRobolectricTestRunner.Parameters
17
17
import org.robolectric.Shadows.shadowOf
18
+ import kotlin.coroutines.EmptyCoroutineContext
18
19
import kotlin.test.AfterTest
19
20
import kotlin.test.BeforeTest
20
21
import kotlin.test.Test
@@ -35,6 +36,7 @@ class IsPlayingAllTypeOfContentTest(
35
36
type = Default ,
36
37
) {
37
38
clock(FakeClock (true ))
39
+ coroutineContext(EmptyCoroutineContext )
38
40
}
39
41
}
40
42
@@ -47,7 +49,7 @@ class IsPlayingAllTypeOfContentTest(
47
49
48
50
@Test
49
51
fun `is playing` () {
50
- player.addMediaItem (MediaItem .fromUri(urlToTest))
52
+ player.setMediaItem (MediaItem .fromUri(urlToTest))
51
53
player.prepare()
52
54
player.play()
53
55
@@ -60,32 +62,21 @@ class IsPlayingAllTypeOfContentTest(
60
62
}
61
63
62
64
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
-
75
65
@JvmStatic
76
66
@Suppress(" unused" )
77
67
@Parameters(name = " {index}: {0}" )
78
68
fun parameters (): Iterable <Any > {
79
69
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" ,
89
80
)
90
81
}
91
82
}
0 commit comments