mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Avoid unsupported mock operation
Calling a real method on an interface is not supported by the Mockito version run by Gradle. #cherrypick PiperOrigin-RevId: 737940266
This commit is contained in:
parent
bdc2216492
commit
4daa43b257
@ -233,7 +233,8 @@ public final class DashMediaPeriodTest {
|
|||||||
private static DashMediaPeriod createDashMediaPeriod(DashManifest manifest, int periodIndex) {
|
private static DashMediaPeriod createDashMediaPeriod(DashManifest manifest, int periodIndex) {
|
||||||
MediaPeriodId mediaPeriodId = new MediaPeriodId(/* periodUid= */ new Object());
|
MediaPeriodId mediaPeriodId = new MediaPeriodId(/* periodUid= */ new Object());
|
||||||
DashChunkSource.Factory chunkSourceFactory = mock(DashChunkSource.Factory.class);
|
DashChunkSource.Factory chunkSourceFactory = mock(DashChunkSource.Factory.class);
|
||||||
when(chunkSourceFactory.getOutputTextFormat(any())).thenCallRealMethod();
|
when(chunkSourceFactory.getOutputTextFormat(any()))
|
||||||
|
.then(invocation -> invocation.getArguments()[0]);
|
||||||
return new DashMediaPeriod(
|
return new DashMediaPeriod(
|
||||||
/* id= */ periodIndex,
|
/* id= */ periodIndex,
|
||||||
manifest,
|
manifest,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user