Allow exoplayer/v2/ mockito2

PiperOrigin-RevId: 238625384
This commit is contained in:
olly 2019-03-15 12:24:43 +00:00 committed by Oliver Woodman
parent f9055396b8
commit 07702cecdd
7 changed files with 10 additions and 7 deletions

View File

@ -2,6 +2,7 @@
### dev-v2 (not yet released) ###
* Update to Mockito 2
* Add new `ExoPlaybackException` types for remote exceptions and out-of-memory
errors.
* HLS:

View File

@ -18,8 +18,8 @@ project.ext {
minSdkVersion = 16
targetSdkVersion = 28
compileSdkVersion = 28
dexmakerVersion = '1.2'
mockitoVersion = '1.9.5'
dexmakerVersion = '2.21.0'
mockitoVersion = '2.25.0'
robolectricVersion = '4.2'
autoValueVersion = '1.6'
checkerframeworkVersion = '2.5.0'

View File

@ -97,6 +97,7 @@ import java.util.UUID;
samples.add(
new Sample(
"https://html5demos.com/assets/dizzy.mp4", "Clear MP4: Dizzy", MIME_TYPE_VIDEO_MP4));
SAMPLES = Collections.unmodifiableList(samples);
}

View File

@ -65,8 +65,8 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:' + androidXTestVersion
androidTestImplementation 'androidx.test.ext:truth:' + androidXTestVersion
androidTestImplementation 'com.google.auto.value:auto-value-annotations:' + autoValueVersion
androidTestImplementation 'com.google.dexmaker:dexmaker:' + dexmakerVersion
androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:' + dexmakerVersion
androidTestImplementation 'com.linkedin.dexmaker:dexmaker:' + dexmakerVersion
androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:' + dexmakerVersion
androidTestImplementation 'org.mockito:mockito-core:' + mockitoVersion
androidTestAnnotationProcessor 'com.google.auto.value:auto-value:' + autoValueVersion
testImplementation 'androidx.test:core:' + androidXTestVersion

View File

@ -238,6 +238,7 @@ public interface MediaSource {
default Object getTag() {
return null;
}
/**
* Starts source preparation if not yet started, and adds a listener for timeline and/or manifest
* updates.

View File

@ -148,7 +148,7 @@ public class OfflineLicenseHelperTest {
private void setStubKeySetId(byte[] keySetId)
throws android.media.NotProvisionedException, android.media.DeniedByServerException {
when(mediaDrm.provideKeyResponse(any(byte[].class), any(byte[].class))).thenReturn(keySetId);
when(mediaDrm.provideKeyResponse(any(byte[].class), any())).thenReturn(keySetId);
}
private static void assertOfflineLicenseKeySetIdEqual(

View File

@ -16,8 +16,8 @@
package com.google.android.exoplayer2.trackselection;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.argThat;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.mock;
@ -268,7 +268,7 @@ public final class AdaptiveTrackSelectionTest {
ArgumentMatcher<Format[]> matcher =
new ArgumentMatcher<Format[]>() {
@Override
public boolean matches(Object argument) {
public boolean matches(Format[] argument) {
Format[] formats = (Format[]) argument;
return formats.length == 3
&& Arrays.asList(formats).containsAll(Arrays.asList(format1, format2, format3));