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 (cherry picked from commit 4daa43b25727d1d197095d0a9e2cc5a3610d881a)
This commit is contained in:
parent
d8914c31e2
commit
8e2ed3bf4d
@ -233,7 +233,8 @@ public final class DashMediaPeriodTest {
|
||||
private static DashMediaPeriod createDashMediaPeriod(DashManifest manifest, int periodIndex) {
|
||||
MediaPeriodId mediaPeriodId = new MediaPeriodId(/* periodUid= */ new Object());
|
||||
DashChunkSource.Factory chunkSourceFactory = mock(DashChunkSource.Factory.class);
|
||||
when(chunkSourceFactory.getOutputTextFormat(any())).thenCallRealMethod();
|
||||
when(chunkSourceFactory.getOutputTextFormat(any()))
|
||||
.then(invocation -> invocation.getArguments()[0]);
|
||||
return new DashMediaPeriod(
|
||||
/* id= */ periodIndex,
|
||||
manifest,
|
||||
|
Loading…
x
Reference in New Issue
Block a user