@@ -91,7 +91,12 @@ class StreamItemAdapterTest {
9191 context,
9292 StreamItemAdapter .StreamSizeWrapper (
9393 (0 until 5 ).map {
94- SubtitlesStream (MediaFormat .SRT , " pt-BR" , " https://example.com" , false )
94+ SubtitlesStream .Builder ()
95+ .setContent(" https://example.com" , true )
96+ .setMediaFormat(MediaFormat .SRT )
97+ .setLanguageCode(" pt-BR" )
98+ .setAutoGenerated(false )
99+ .build()
95100 },
96101 context
97102 ),
@@ -108,7 +113,14 @@ class StreamItemAdapterTest {
108113 val adapter = StreamItemAdapter <AudioStream , Stream >(
109114 context,
110115 StreamItemAdapter .StreamSizeWrapper (
111- (0 until 5 ).map { AudioStream (" https://example.com/$it " , MediaFormat .OPUS , 192 ) },
116+ (0 until 5 ).map {
117+ AudioStream .Builder ()
118+ .setId(Stream .ID_UNKNOWN )
119+ .setContent(" https://example.com/$it " , true )
120+ .setMediaFormat(MediaFormat .OPUS )
121+ .setAverageBitrate(192 )
122+ .build()
123+ },
112124 context
113125 ),
114126 null
@@ -126,7 +138,13 @@ class StreamItemAdapterTest {
126138 private fun getVideoStreams (vararg videoOnly : Boolean ) =
127139 StreamItemAdapter .StreamSizeWrapper (
128140 videoOnly.map {
129- VideoStream (" https://example.com" , MediaFormat .MPEG_4 , " 720p" , it)
141+ VideoStream .Builder ()
142+ .setId(Stream .ID_UNKNOWN )
143+ .setContent(" https://example.com" , true )
144+ .setMediaFormat(MediaFormat .MPEG_4 )
145+ .setResolution(" 720p" )
146+ .setIsVideoOnly(it)
147+ .build()
130148 },
131149 context
132150 )
@@ -138,8 +156,16 @@ class StreamItemAdapterTest {
138156 private fun getAudioStreams (vararg shouldBeValid : Boolean ) =
139157 getSecondaryStreamsFromList(
140158 shouldBeValid.map {
141- if (it) AudioStream (" https://example.com" , MediaFormat .OPUS , 192 )
142- else null
159+ if (it) {
160+ AudioStream .Builder ()
161+ .setId(Stream .ID_UNKNOWN )
162+ .setContent(" https://example.com" , true )
163+ .setMediaFormat(MediaFormat .OPUS )
164+ .setAverageBitrate(192 )
165+ .build()
166+ } else {
167+ null
168+ }
143169 }
144170 )
145171
0 commit comments