Allow exoplayer/v2/ mockito2
PiperOrigin-RevId: 238625384
This commit is contained in:
parent
f9055396b8
commit
07702cecdd
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
### dev-v2 (not yet released) ###
|
### dev-v2 (not yet released) ###
|
||||||
|
|
||||||
|
* Update to Mockito 2
|
||||||
* Add new `ExoPlaybackException` types for remote exceptions and out-of-memory
|
* Add new `ExoPlaybackException` types for remote exceptions and out-of-memory
|
||||||
errors.
|
errors.
|
||||||
* HLS:
|
* HLS:
|
||||||
|
@ -18,8 +18,8 @@ project.ext {
|
|||||||
minSdkVersion = 16
|
minSdkVersion = 16
|
||||||
targetSdkVersion = 28
|
targetSdkVersion = 28
|
||||||
compileSdkVersion = 28
|
compileSdkVersion = 28
|
||||||
dexmakerVersion = '1.2'
|
dexmakerVersion = '2.21.0'
|
||||||
mockitoVersion = '1.9.5'
|
mockitoVersion = '2.25.0'
|
||||||
robolectricVersion = '4.2'
|
robolectricVersion = '4.2'
|
||||||
autoValueVersion = '1.6'
|
autoValueVersion = '1.6'
|
||||||
checkerframeworkVersion = '2.5.0'
|
checkerframeworkVersion = '2.5.0'
|
||||||
|
@ -97,6 +97,7 @@ import java.util.UUID;
|
|||||||
samples.add(
|
samples.add(
|
||||||
new Sample(
|
new Sample(
|
||||||
"https://html5demos.com/assets/dizzy.mp4", "Clear MP4: Dizzy", MIME_TYPE_VIDEO_MP4));
|
"https://html5demos.com/assets/dizzy.mp4", "Clear MP4: Dizzy", MIME_TYPE_VIDEO_MP4));
|
||||||
|
|
||||||
SAMPLES = Collections.unmodifiableList(samples);
|
SAMPLES = Collections.unmodifiableList(samples);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,8 +65,8 @@ dependencies {
|
|||||||
androidTestImplementation 'androidx.test.ext:junit:' + androidXTestVersion
|
androidTestImplementation 'androidx.test.ext:junit:' + androidXTestVersion
|
||||||
androidTestImplementation 'androidx.test.ext:truth:' + androidXTestVersion
|
androidTestImplementation 'androidx.test.ext:truth:' + androidXTestVersion
|
||||||
androidTestImplementation 'com.google.auto.value:auto-value-annotations:' + autoValueVersion
|
androidTestImplementation 'com.google.auto.value:auto-value-annotations:' + autoValueVersion
|
||||||
androidTestImplementation 'com.google.dexmaker:dexmaker:' + dexmakerVersion
|
androidTestImplementation 'com.linkedin.dexmaker:dexmaker:' + dexmakerVersion
|
||||||
androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:' + dexmakerVersion
|
androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:' + dexmakerVersion
|
||||||
androidTestImplementation 'org.mockito:mockito-core:' + mockitoVersion
|
androidTestImplementation 'org.mockito:mockito-core:' + mockitoVersion
|
||||||
androidTestAnnotationProcessor 'com.google.auto.value:auto-value:' + autoValueVersion
|
androidTestAnnotationProcessor 'com.google.auto.value:auto-value:' + autoValueVersion
|
||||||
testImplementation 'androidx.test:core:' + androidXTestVersion
|
testImplementation 'androidx.test:core:' + androidXTestVersion
|
||||||
|
@ -238,6 +238,7 @@ public interface MediaSource {
|
|||||||
default Object getTag() {
|
default Object getTag() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts source preparation if not yet started, and adds a listener for timeline and/or manifest
|
* Starts source preparation if not yet started, and adds a listener for timeline and/or manifest
|
||||||
* updates.
|
* updates.
|
||||||
|
@ -148,7 +148,7 @@ public class OfflineLicenseHelperTest {
|
|||||||
|
|
||||||
private void setStubKeySetId(byte[] keySetId)
|
private void setStubKeySetId(byte[] keySetId)
|
||||||
throws android.media.NotProvisionedException, android.media.DeniedByServerException {
|
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(
|
private static void assertOfflineLicenseKeySetIdEqual(
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
package com.google.android.exoplayer2.trackselection;
|
package com.google.android.exoplayer2.trackselection;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
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.any;
|
||||||
import static org.mockito.Matchers.argThat;
|
|
||||||
import static org.mockito.Matchers.eq;
|
import static org.mockito.Matchers.eq;
|
||||||
import static org.mockito.Mockito.atLeastOnce;
|
import static org.mockito.Mockito.atLeastOnce;
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
@ -268,7 +268,7 @@ public final class AdaptiveTrackSelectionTest {
|
|||||||
ArgumentMatcher<Format[]> matcher =
|
ArgumentMatcher<Format[]> matcher =
|
||||||
new ArgumentMatcher<Format[]>() {
|
new ArgumentMatcher<Format[]>() {
|
||||||
@Override
|
@Override
|
||||||
public boolean matches(Object argument) {
|
public boolean matches(Format[] argument) {
|
||||||
Format[] formats = (Format[]) argument;
|
Format[] formats = (Format[]) argument;
|
||||||
return formats.length == 3
|
return formats.length == 3
|
||||||
&& Arrays.asList(formats).containsAll(Arrays.asList(format1, format2, format3));
|
&& Arrays.asList(formats).containsAll(Arrays.asList(format1, format2, format3));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user