mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Drop prefix test- from test methods under v2/extensions
This is one step toward following the google3's test naming convention.
See go/java-testing/getting_started#basic-test-template for details
why prefix test isn't necessary.
This CL is generated by following command
$ find -name '*Test.java' | xargs -I{} sed -i 's/^\ \ public\ void\ test\([A-Z]\)\(.*\)$/ public void \L\1\E\2/' {}
PiperOrigin-RevId: 300530329
This commit is contained in:
parent
2bd4d61b9b
commit
2f91c12f56
8 changed files with 81 additions and 82 deletions
|
|
@ -82,7 +82,7 @@ public class CastPlayerTest {
|
|||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Test
|
||||
public void testSetPlayWhenReady_masksRemoteState() {
|
||||
public void setPlayWhenReady_masksRemoteState() {
|
||||
when(mockRemoteMediaClient.play()).thenReturn(mockPendingResult);
|
||||
assertThat(castPlayer.getPlayWhenReady()).isFalse();
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ public class CastPlayerTest {
|
|||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Test
|
||||
public void testSetPlayWhenReadyMasking_updatesUponResultChange() {
|
||||
public void setPlayWhenReadyMasking_updatesUponResultChange() {
|
||||
when(mockRemoteMediaClient.play()).thenReturn(mockPendingResult);
|
||||
assertThat(castPlayer.getPlayWhenReady()).isFalse();
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ public class CastPlayerTest {
|
|||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Test
|
||||
public void testSetPlayWhenReady_correctChangeReasonOnPause() {
|
||||
public void setPlayWhenReady_correctChangeReasonOnPause() {
|
||||
when(mockRemoteMediaClient.play()).thenReturn(mockPendingResult);
|
||||
when(mockRemoteMediaClient.pause()).thenReturn(mockPendingResult);
|
||||
castPlayer.play();
|
||||
|
|
@ -147,7 +147,7 @@ public class CastPlayerTest {
|
|||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Test
|
||||
public void testPlayWhenReady_changesOnStatusUpdates() {
|
||||
public void playWhenReady_changesOnStatusUpdates() {
|
||||
assertThat(castPlayer.getPlayWhenReady()).isFalse();
|
||||
when(mockRemoteMediaClient.isPaused()).thenReturn(false);
|
||||
remoteMediaClientListener.onStatusUpdated();
|
||||
|
|
@ -157,7 +157,7 @@ public class CastPlayerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSetRepeatMode_masksRemoteState() {
|
||||
public void setRepeatMode_masksRemoteState() {
|
||||
when(mockRemoteMediaClient.queueSetRepeatMode(anyInt(), any())).thenReturn(mockPendingResult);
|
||||
assertThat(castPlayer.getRepeatMode()).isEqualTo(Player.REPEAT_MODE_OFF);
|
||||
|
||||
|
|
@ -180,7 +180,7 @@ public class CastPlayerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSetRepeatMode_updatesUponResultChange() {
|
||||
public void setRepeatMode_updatesUponResultChange() {
|
||||
when(mockRemoteMediaClient.queueSetRepeatMode(anyInt(), any())).thenReturn(mockPendingResult);
|
||||
|
||||
castPlayer.setRepeatMode(Player.REPEAT_MODE_ONE);
|
||||
|
|
@ -202,7 +202,7 @@ public class CastPlayerTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRepeatMode_changesOnStatusUpdates() {
|
||||
public void repeatMode_changesOnStatusUpdates() {
|
||||
assertThat(castPlayer.getRepeatMode()).isEqualTo(Player.REPEAT_MODE_OFF);
|
||||
when(mockMediaStatus.getQueueRepeatMode()).thenReturn(MediaStatus.REPEAT_MODE_REPEAT_SINGLE);
|
||||
remoteMediaClientListener.onStatusUpdated();
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class CastTimelineTrackerTest {
|
|||
|
||||
/** Tests that duration of the current media info is correctly propagated to the timeline. */
|
||||
@Test
|
||||
public void testGetCastTimelinePersistsDuration() {
|
||||
public void getCastTimelinePersistsDuration() {
|
||||
CastTimelineTracker tracker = new CastTimelineTracker();
|
||||
|
||||
RemoteMediaClient remoteMediaClient =
|
||||
|
|
|
|||
|
|
@ -48,18 +48,18 @@ public final class ByteArrayUploadDataProviderTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetLength() {
|
||||
public void getLength() {
|
||||
assertThat(byteArrayUploadDataProvider.getLength()).isEqualTo(TEST_DATA.length);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testReadFullBuffer() throws IOException {
|
||||
public void readFullBuffer() throws IOException {
|
||||
byteArrayUploadDataProvider.read(mockUploadDataSink, byteBuffer);
|
||||
assertThat(byteBuffer.array()).isEqualTo(TEST_DATA);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testReadPartialBuffer() throws IOException {
|
||||
public void readPartialBuffer() throws IOException {
|
||||
byte[] firstHalf = Arrays.copyOf(TEST_DATA, TEST_DATA.length / 2);
|
||||
byte[] secondHalf = Arrays.copyOfRange(TEST_DATA, TEST_DATA.length / 2, TEST_DATA.length);
|
||||
byteBuffer = ByteBuffer.allocate(TEST_DATA.length / 2);
|
||||
|
|
@ -75,7 +75,7 @@ public final class ByteArrayUploadDataProviderTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRewind() throws IOException {
|
||||
public void rewind() throws IOException {
|
||||
// Read all the data.
|
||||
byteArrayUploadDataProvider.read(mockUploadDataSink, byteBuffer);
|
||||
assertThat(byteBuffer.array()).isEqualTo(TEST_DATA);
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testOpeningTwiceThrows() throws HttpDataSourceException {
|
||||
public void openingTwiceThrows() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
dataSourceUnderTest.open(testDataSpec);
|
||||
try {
|
||||
|
|
@ -170,7 +170,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCallbackFromPreviousRequest() throws HttpDataSourceException {
|
||||
public void callbackFromPreviousRequest() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
|
||||
dataSourceUnderTest.open(testDataSpec);
|
||||
|
|
@ -193,7 +193,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRequestStartCalled() throws HttpDataSourceException {
|
||||
public void requestStartCalled() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
|
||||
dataSourceUnderTest.open(testDataSpec);
|
||||
|
|
@ -203,7 +203,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRequestSetsRangeHeader() throws HttpDataSourceException {
|
||||
public void requestSetsRangeHeader() throws HttpDataSourceException {
|
||||
testDataSpec = new DataSpec(Uri.parse(TEST_URL), 1000, 5000);
|
||||
mockResponseStartSuccess();
|
||||
|
||||
|
|
@ -213,7 +213,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRequestHeadersSet() throws HttpDataSourceException {
|
||||
public void requestHeadersSet() throws HttpDataSourceException {
|
||||
Map<String, String> headersSet = new HashMap<>();
|
||||
doAnswer(
|
||||
(invocation) -> {
|
||||
|
|
@ -256,7 +256,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRequestOpen() throws HttpDataSourceException {
|
||||
public void requestOpen() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
assertThat(dataSourceUnderTest.open(testDataSpec)).isEqualTo(TEST_CONTENT_LENGTH);
|
||||
verify(mockTransferListener)
|
||||
|
|
@ -264,8 +264,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRequestOpenGzippedCompressedReturnsDataSpecLength()
|
||||
throws HttpDataSourceException {
|
||||
public void requestOpenGzippedCompressedReturnsDataSpecLength() throws HttpDataSourceException {
|
||||
testDataSpec = new DataSpec(Uri.parse(TEST_URL), 0, 5000);
|
||||
testResponseHeader.put("Content-Encoding", "gzip");
|
||||
testResponseHeader.put("Content-Length", Long.toString(50L));
|
||||
|
|
@ -277,7 +276,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRequestOpenFail() {
|
||||
public void requestOpenFail() {
|
||||
mockResponseStartFailure();
|
||||
|
||||
try {
|
||||
|
|
@ -313,7 +312,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRequestOpenFailDueToDnsFailure() {
|
||||
public void requestOpenFailDueToDnsFailure() {
|
||||
mockResponseStartFailure();
|
||||
when(mockNetworkException.getErrorCode())
|
||||
.thenReturn(NetworkException.ERROR_HOSTNAME_NOT_RESOLVED);
|
||||
|
|
@ -331,7 +330,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRequestOpenValidatesStatusCode() {
|
||||
public void requestOpenValidatesStatusCode() {
|
||||
mockResponseStartSuccess();
|
||||
testUrlResponseInfo = createUrlResponseInfo(500); // statusCode
|
||||
|
||||
|
|
@ -348,7 +347,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRequestOpenValidatesContentTypePredicate() {
|
||||
public void requestOpenValidatesContentTypePredicate() {
|
||||
mockResponseStartSuccess();
|
||||
|
||||
ArrayList<String> testedContentTypes = new ArrayList<>();
|
||||
|
|
@ -371,7 +370,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPostRequestOpen() throws HttpDataSourceException {
|
||||
public void postRequestOpen() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
|
||||
dataSourceUnderTest.setRequestProperty("Content-Type", TEST_CONTENT_TYPE);
|
||||
|
|
@ -381,7 +380,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPostRequestOpenValidatesContentType() {
|
||||
public void postRequestOpenValidatesContentType() {
|
||||
mockResponseStartSuccess();
|
||||
|
||||
try {
|
||||
|
|
@ -393,7 +392,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPostRequestOpenRejects307Redirects() {
|
||||
public void postRequestOpenRejects307Redirects() {
|
||||
mockResponseStartSuccess();
|
||||
mockResponseStartRedirect();
|
||||
|
||||
|
|
@ -407,7 +406,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testHeadRequestOpen() throws HttpDataSourceException {
|
||||
public void headRequestOpen() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
dataSourceUnderTest.open(testHeadDataSpec);
|
||||
verify(mockTransferListener)
|
||||
|
|
@ -416,7 +415,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRequestReadTwice() throws HttpDataSourceException {
|
||||
public void requestReadTwice() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
mockReadSuccess(0, 16);
|
||||
|
||||
|
|
@ -439,7 +438,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSecondRequestNoContentLength() throws HttpDataSourceException {
|
||||
public void secondRequestNoContentLength() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
testResponseHeader.put("Content-Length", Long.toString(1L));
|
||||
mockReadSuccess(0, 16);
|
||||
|
|
@ -465,7 +464,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReadWithOffset() throws HttpDataSourceException {
|
||||
public void readWithOffset() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
mockReadSuccess(0, 16);
|
||||
|
||||
|
|
@ -480,7 +479,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRangeRequestWith206Response() throws HttpDataSourceException {
|
||||
public void rangeRequestWith206Response() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
mockReadSuccess(1000, 5000);
|
||||
testUrlResponseInfo = createUrlResponseInfo(206); // Server supports range requests.
|
||||
|
|
@ -497,7 +496,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRangeRequestWith200Response() throws HttpDataSourceException {
|
||||
public void rangeRequestWith200Response() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
mockReadSuccess(0, 7000);
|
||||
testUrlResponseInfo = createUrlResponseInfo(200); // Server does not support range requests.
|
||||
|
|
@ -514,7 +513,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReadWithUnsetLength() throws HttpDataSourceException {
|
||||
public void readWithUnsetLength() throws HttpDataSourceException {
|
||||
testResponseHeader.remove("Content-Length");
|
||||
mockResponseStartSuccess();
|
||||
mockReadSuccess(0, 16);
|
||||
|
|
@ -530,7 +529,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReadReturnsWhatItCan() throws HttpDataSourceException {
|
||||
public void readReturnsWhatItCan() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
mockReadSuccess(0, 16);
|
||||
|
||||
|
|
@ -545,7 +544,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testClosedMeansClosed() throws HttpDataSourceException {
|
||||
public void closedMeansClosed() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
mockReadSuccess(0, 16);
|
||||
|
||||
|
|
@ -573,7 +572,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testOverread() throws HttpDataSourceException {
|
||||
public void overread() throws HttpDataSourceException {
|
||||
testDataSpec = new DataSpec(Uri.parse(TEST_URL), 0, 16);
|
||||
testResponseHeader.put("Content-Length", Long.toString(16L));
|
||||
mockResponseStartSuccess();
|
||||
|
|
@ -626,7 +625,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRequestReadByteBufferTwice() throws HttpDataSourceException {
|
||||
public void requestReadByteBufferTwice() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
mockReadSuccess(0, 16);
|
||||
|
||||
|
|
@ -652,7 +651,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRequestIntermixRead() throws HttpDataSourceException {
|
||||
public void requestIntermixRead() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
// Chunking reads into parts 6, 7, 8, 9.
|
||||
mockReadSuccess(0, 30);
|
||||
|
|
@ -694,7 +693,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSecondRequestNoContentLengthReadByteBuffer() throws HttpDataSourceException {
|
||||
public void secondRequestNoContentLengthReadByteBuffer() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
testResponseHeader.put("Content-Length", Long.toString(1L));
|
||||
mockReadSuccess(0, 16);
|
||||
|
|
@ -723,7 +722,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRangeRequestWith206ResponseReadByteBuffer() throws HttpDataSourceException {
|
||||
public void rangeRequestWith206ResponseReadByteBuffer() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
mockReadSuccess(1000, 5000);
|
||||
testUrlResponseInfo = createUrlResponseInfo(206); // Server supports range requests.
|
||||
|
|
@ -741,7 +740,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRangeRequestWith200ResponseReadByteBuffer() throws HttpDataSourceException {
|
||||
public void rangeRequestWith200ResponseReadByteBuffer() throws HttpDataSourceException {
|
||||
// Tests for skipping bytes.
|
||||
mockResponseStartSuccess();
|
||||
mockReadSuccess(0, 7000);
|
||||
|
|
@ -760,7 +759,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReadByteBufferWithUnsetLength() throws HttpDataSourceException {
|
||||
public void readByteBufferWithUnsetLength() throws HttpDataSourceException {
|
||||
testResponseHeader.remove("Content-Length");
|
||||
mockResponseStartSuccess();
|
||||
mockReadSuccess(0, 16);
|
||||
|
|
@ -778,7 +777,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReadByteBufferReturnsWhatItCan() throws HttpDataSourceException {
|
||||
public void readByteBufferReturnsWhatItCan() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
mockReadSuccess(0, 16);
|
||||
|
||||
|
|
@ -794,7 +793,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testOverreadByteBuffer() throws HttpDataSourceException {
|
||||
public void overreadByteBuffer() throws HttpDataSourceException {
|
||||
testDataSpec = new DataSpec(Uri.parse(TEST_URL), 0, 16);
|
||||
testResponseHeader.put("Content-Length", Long.toString(16L));
|
||||
mockResponseStartSuccess();
|
||||
|
|
@ -850,7 +849,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testClosedMeansClosedReadByteBuffer() throws HttpDataSourceException {
|
||||
public void closedMeansClosedReadByteBuffer() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
mockReadSuccess(0, 16);
|
||||
|
||||
|
|
@ -880,7 +879,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testConnectTimeout() throws InterruptedException {
|
||||
public void connectTimeout() throws InterruptedException {
|
||||
long startTimeMs = SystemClock.elapsedRealtime();
|
||||
final ConditionVariable startCondition = buildUrlRequestStartedCondition();
|
||||
final CountDownLatch timedOutLatch = new CountDownLatch(1);
|
||||
|
|
@ -919,7 +918,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testConnectInterrupted() throws InterruptedException {
|
||||
public void connectInterrupted() throws InterruptedException {
|
||||
long startTimeMs = SystemClock.elapsedRealtime();
|
||||
final ConditionVariable startCondition = buildUrlRequestStartedCondition();
|
||||
final CountDownLatch timedOutLatch = new CountDownLatch(1);
|
||||
|
|
@ -959,7 +958,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testConnectResponseBeforeTimeout() throws Exception {
|
||||
public void connectResponseBeforeTimeout() throws Exception {
|
||||
long startTimeMs = SystemClock.elapsedRealtime();
|
||||
final ConditionVariable startCondition = buildUrlRequestStartedCondition();
|
||||
final CountDownLatch openLatch = new CountDownLatch(1);
|
||||
|
|
@ -992,7 +991,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRedirectIncreasesConnectionTimeout() throws Exception {
|
||||
public void redirectIncreasesConnectionTimeout() throws Exception {
|
||||
long startTimeMs = SystemClock.elapsedRealtime();
|
||||
final ConditionVariable startCondition = buildUrlRequestStartedCondition();
|
||||
final CountDownLatch timedOutLatch = new CountDownLatch(1);
|
||||
|
|
@ -1047,7 +1046,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRedirectParseAndAttachCookie_dataSourceDoesNotHandleSetCookie_followsRedirect()
|
||||
public void redirectParseAndAttachCookie_dataSourceDoesNotHandleSetCookie_followsRedirect()
|
||||
throws HttpDataSourceException {
|
||||
mockSingleRedirectSuccess();
|
||||
mockFollowRedirectSuccess();
|
||||
|
|
@ -1119,7 +1118,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRedirectNoSetCookieFollowsRedirect() throws HttpDataSourceException {
|
||||
public void redirectNoSetCookieFollowsRedirect() throws HttpDataSourceException {
|
||||
mockSingleRedirectSuccess();
|
||||
mockFollowRedirectSuccess();
|
||||
|
||||
|
|
@ -1129,7 +1128,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRedirectNoSetCookieFollowsRedirect_dataSourceHandlesSetCookie()
|
||||
public void redirectNoSetCookieFollowsRedirect_dataSourceHandlesSetCookie()
|
||||
throws HttpDataSourceException {
|
||||
dataSourceUnderTest =
|
||||
new CronetDataSource(
|
||||
|
|
@ -1151,7 +1150,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testExceptionFromTransferListener() throws HttpDataSourceException {
|
||||
public void exceptionFromTransferListener() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
|
||||
// Make mockTransferListener throw an exception in CronetDataSource.close(). Ensure that
|
||||
|
|
@ -1171,7 +1170,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReadFailure() throws HttpDataSourceException {
|
||||
public void readFailure() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
mockReadFailure();
|
||||
|
||||
|
|
@ -1186,7 +1185,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReadByteBufferFailure() throws HttpDataSourceException {
|
||||
public void readByteBufferFailure() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
mockReadFailure();
|
||||
|
||||
|
|
@ -1201,7 +1200,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReadNonDirectedByteBufferFailure() throws HttpDataSourceException {
|
||||
public void readNonDirectedByteBufferFailure() throws HttpDataSourceException {
|
||||
mockResponseStartSuccess();
|
||||
mockReadFailure();
|
||||
|
||||
|
|
@ -1216,7 +1215,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReadInterrupted() throws HttpDataSourceException, InterruptedException {
|
||||
public void readInterrupted() throws HttpDataSourceException, InterruptedException {
|
||||
mockResponseStartSuccess();
|
||||
dataSourceUnderTest.open(testDataSpec);
|
||||
|
||||
|
|
@ -1247,7 +1246,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReadByteBufferInterrupted() throws HttpDataSourceException, InterruptedException {
|
||||
public void readByteBufferInterrupted() throws HttpDataSourceException, InterruptedException {
|
||||
mockResponseStartSuccess();
|
||||
dataSourceUnderTest.open(testDataSpec);
|
||||
|
||||
|
|
@ -1278,7 +1277,7 @@ public final class CronetDataSourceTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testAllowDirectExecutor() throws HttpDataSourceException {
|
||||
public void allowDirectExecutor() throws HttpDataSourceException {
|
||||
testDataSpec = new DataSpec(Uri.parse(TEST_URL), 1000, 5000);
|
||||
mockResponseStartSuccess();
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public class FlacExtractorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSample() throws Exception {
|
||||
public void sample() throws Exception {
|
||||
ExtractorAsserts.assertBehavior(
|
||||
FlacExtractor::new,
|
||||
/* file= */ "flac/bear.flac",
|
||||
|
|
@ -45,7 +45,7 @@ public class FlacExtractorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSampleWithId3HeaderAndId3Enabled() throws Exception {
|
||||
public void sampleWithId3HeaderAndId3Enabled() throws Exception {
|
||||
ExtractorAsserts.assertBehavior(
|
||||
FlacExtractor::new,
|
||||
/* file= */ "flac/bear_with_id3.flac",
|
||||
|
|
@ -54,7 +54,7 @@ public class FlacExtractorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSampleWithId3HeaderAndId3Disabled() throws Exception {
|
||||
public void sampleWithId3HeaderAndId3Disabled() throws Exception {
|
||||
ExtractorAsserts.assertBehavior(
|
||||
() -> new FlacExtractor(FlacExtractor.FLAG_DISABLE_ID3_METADATA),
|
||||
/* file= */ "flac/bear_with_id3.flac",
|
||||
|
|
@ -63,7 +63,7 @@ public class FlacExtractorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSampleUnseekable() throws Exception {
|
||||
public void sampleUnseekable() throws Exception {
|
||||
ExtractorAsserts.assertBehavior(
|
||||
FlacExtractor::new,
|
||||
/* file= */ "flac/bear_no_seek_table_no_num_samples.flac",
|
||||
|
|
@ -72,7 +72,7 @@ public class FlacExtractorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSampleWithVorbisComments() throws Exception {
|
||||
public void sampleWithVorbisComments() throws Exception {
|
||||
ExtractorAsserts.assertBehavior(
|
||||
FlacExtractor::new,
|
||||
/* file= */ "flac/bear_with_vorbis_comments.flac",
|
||||
|
|
@ -81,7 +81,7 @@ public class FlacExtractorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSampleWithPicture() throws Exception {
|
||||
public void sampleWithPicture() throws Exception {
|
||||
ExtractorAsserts.assertBehavior(
|
||||
FlacExtractor::new,
|
||||
/* file= */ "flac/bear_with_picture.flac",
|
||||
|
|
@ -90,7 +90,7 @@ public class FlacExtractorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testOneMetadataBlock() throws Exception {
|
||||
public void oneMetadataBlock() throws Exception {
|
||||
ExtractorAsserts.assertBehavior(
|
||||
FlacExtractor::new,
|
||||
/* file= */ "flac/bear_one_metadata_block.flac",
|
||||
|
|
@ -99,7 +99,7 @@ public class FlacExtractorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testNoMinMaxFrameSize() throws Exception {
|
||||
public void noMinMaxFrameSize() throws Exception {
|
||||
ExtractorAsserts.assertBehavior(
|
||||
FlacExtractor::new,
|
||||
/* file= */ "flac/bear_no_min_max_frame_size.flac",
|
||||
|
|
@ -108,7 +108,7 @@ public class FlacExtractorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testNoNumSamples() throws Exception {
|
||||
public void noNumSamples() throws Exception {
|
||||
ExtractorAsserts.assertBehavior(
|
||||
FlacExtractor::new,
|
||||
/* file= */ "flac/bear_no_num_samples.flac",
|
||||
|
|
@ -117,7 +117,7 @@ public class FlacExtractorTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testUncommonSampleRate() throws Exception {
|
||||
public void uncommonSampleRate() throws Exception {
|
||||
ExtractorAsserts.assertBehavior(
|
||||
FlacExtractor::new,
|
||||
/* file= */ "flac/bear_uncommon_sample_rate.flac",
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ public class ImaAdsLoaderTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testBuilder_overridesPlayerType() {
|
||||
public void builder_overridesPlayerType() {
|
||||
when(imaSdkSettings.getPlayerType()).thenReturn("test player type");
|
||||
setupPlayback(CONTENT_TIMELINE, PREROLL_ADS_DURATIONS_US, PREROLL_CUE_POINTS_SECONDS);
|
||||
|
||||
|
|
@ -134,7 +134,7 @@ public class ImaAdsLoaderTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testStart_setsAdUiViewGroup() {
|
||||
public void start_setsAdUiViewGroup() {
|
||||
setupPlayback(CONTENT_TIMELINE, PREROLL_ADS_DURATIONS_US, PREROLL_CUE_POINTS_SECONDS);
|
||||
imaAdsLoader.start(adsLoaderListener, adViewProvider);
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ public class ImaAdsLoaderTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testStart_withPlaceholderContent_initializedAdsLoader() {
|
||||
public void start_withPlaceholderContent_initializedAdsLoader() {
|
||||
Timeline placeholderTimeline = new DummyTimeline(/* tag= */ null);
|
||||
setupPlayback(placeholderTimeline, PREROLL_ADS_DURATIONS_US, PREROLL_CUE_POINTS_SECONDS);
|
||||
imaAdsLoader.start(adsLoaderListener, adViewProvider);
|
||||
|
|
@ -153,7 +153,7 @@ public class ImaAdsLoaderTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testStart_updatesAdPlaybackState() {
|
||||
public void start_updatesAdPlaybackState() {
|
||||
setupPlayback(CONTENT_TIMELINE, PREROLL_ADS_DURATIONS_US, PREROLL_CUE_POINTS_SECONDS);
|
||||
imaAdsLoader.start(adsLoaderListener, adViewProvider);
|
||||
|
||||
|
|
@ -165,14 +165,14 @@ public class ImaAdsLoaderTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testStartAfterRelease() {
|
||||
public void startAfterRelease() {
|
||||
setupPlayback(CONTENT_TIMELINE, PREROLL_ADS_DURATIONS_US, PREROLL_CUE_POINTS_SECONDS);
|
||||
imaAdsLoader.release();
|
||||
imaAdsLoader.start(adsLoaderListener, adViewProvider);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStartAndCallbacksAfterRelease() {
|
||||
public void startAndCallbacksAfterRelease() {
|
||||
setupPlayback(CONTENT_TIMELINE, PREROLL_ADS_DURATIONS_US, PREROLL_CUE_POINTS_SECONDS);
|
||||
imaAdsLoader.release();
|
||||
imaAdsLoader.start(adsLoaderListener, adViewProvider);
|
||||
|
|
@ -199,7 +199,7 @@ public class ImaAdsLoaderTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPlayback_withPrerollAd_marksAdAsPlayed() {
|
||||
public void playback_withPrerollAd_marksAdAsPlayed() {
|
||||
setupPlayback(CONTENT_TIMELINE, PREROLL_ADS_DURATIONS_US, PREROLL_CUE_POINTS_SECONDS);
|
||||
|
||||
// Load the preroll ad.
|
||||
|
|
@ -239,7 +239,7 @@ public class ImaAdsLoaderTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testStop_unregistersAllVideoControlOverlays() {
|
||||
public void stop_unregistersAllVideoControlOverlays() {
|
||||
setupPlayback(CONTENT_TIMELINE, PREROLL_ADS_DURATIONS_US, PREROLL_CUE_POINTS_SECONDS);
|
||||
imaAdsLoader.start(adsLoaderListener, adViewProvider);
|
||||
imaAdsLoader.requestAds(adViewGroup);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public class OpusPlaybackTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testBasicPlayback() throws Exception {
|
||||
public void basicPlayback() throws Exception {
|
||||
playUri(BEAR_OPUS_URI);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,12 +57,12 @@ public class VpxPlaybackTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testBasicPlayback() throws Exception {
|
||||
public void basicPlayback() throws Exception {
|
||||
playUri(BEAR_URI);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOddDimensionsPlayback() throws Exception {
|
||||
public void oddDimensionsPlayback() throws Exception {
|
||||
playUri(BEAR_ODD_DIMENSIONS_URI);
|
||||
}
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ public class VpxPlaybackTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidBitstream() {
|
||||
public void invalidBitstream() {
|
||||
try {
|
||||
playUri(INVALID_BITSTREAM_URI);
|
||||
fail();
|
||||
|
|
|
|||
Loading…
Reference in a new issue