mirror of https://github.com/androidx/media
Remove times(1) from effect and transformer tests as it is the default.
PiperOrigin-RevId: 466324322
This commit is contained in:
parent
35161c7489
commit
1bdc252d2c
|
@ -58,7 +58,7 @@ public final class ChainingGlTextureProcessorListenerTest {
|
|||
chainingGlTextureProcessorListener.onInputFrameProcessed(texture);
|
||||
Thread.sleep(EXECUTOR_WAIT_TIME_MS);
|
||||
|
||||
verify(mockProducingGlTextureProcessor, times(1)).releaseOutputFrame(texture);
|
||||
verify(mockProducingGlTextureProcessor).releaseOutputFrame(texture);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -71,8 +71,7 @@ public final class ChainingGlTextureProcessorListenerTest {
|
|||
chainingGlTextureProcessorListener.onOutputFrameAvailable(texture, presentationTimeUs);
|
||||
Thread.sleep(EXECUTOR_WAIT_TIME_MS);
|
||||
|
||||
verify(fakeConsumingGlTextureProcessor, times(1))
|
||||
.maybeQueueInputFrame(texture, presentationTimeUs);
|
||||
verify(fakeConsumingGlTextureProcessor).maybeQueueInputFrame(texture, presentationTimeUs);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -109,7 +108,7 @@ public final class ChainingGlTextureProcessorListenerTest {
|
|||
|
||||
verify(fakeConsumingGlTextureProcessor, times(2))
|
||||
.maybeQueueInputFrame(firstTexture, firstPresentationTimeUs);
|
||||
verify(fakeConsumingGlTextureProcessor, times(1))
|
||||
verify(fakeConsumingGlTextureProcessor)
|
||||
.maybeQueueInputFrame(secondTexture, secondPresentationTimeUs);
|
||||
}
|
||||
|
||||
|
@ -119,7 +118,7 @@ public final class ChainingGlTextureProcessorListenerTest {
|
|||
chainingGlTextureProcessorListener.onCurrentOutputStreamEnded();
|
||||
Thread.sleep(EXECUTOR_WAIT_TIME_MS);
|
||||
|
||||
verify(fakeConsumingGlTextureProcessor, times(1)).signalEndOfCurrentInputStream();
|
||||
verify(fakeConsumingGlTextureProcessor).signalEndOfCurrentInputStream();
|
||||
}
|
||||
|
||||
private static class FakeGlTextureProcessor implements GlTextureProcessor {
|
||||
|
|
|
@ -19,7 +19,6 @@ import static org.junit.Assert.assertThrows;
|
|||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
import android.net.Uri;
|
||||
|
@ -89,7 +88,7 @@ public class FallbackListenerTest {
|
|||
fallbackListener.registerTrack();
|
||||
fallbackListener.onTransformationRequestFinalized(audioFallbackRequest);
|
||||
|
||||
verify(mockListener, times(1))
|
||||
verify(mockListener)
|
||||
.onFallbackApplied(PLACEHOLDER_MEDIA_ITEM, originalRequest, audioFallbackRequest);
|
||||
}
|
||||
|
||||
|
@ -117,7 +116,7 @@ public class FallbackListenerTest {
|
|||
fallbackListener.onTransformationRequestFinalized(audioFallbackRequest);
|
||||
fallbackListener.onTransformationRequestFinalized(videoFallbackRequest);
|
||||
|
||||
verify(mockListener, times(1))
|
||||
verify(mockListener)
|
||||
.onFallbackApplied(PLACEHOLDER_MEDIA_ITEM, originalRequest, mergedFallbackRequest);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ import static org.mockito.ArgumentMatchers.any;
|
|||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
import android.content.Context;
|
||||
|
@ -271,9 +270,9 @@ public final class TransformerEndToEndTest {
|
|||
transformer.startTransformation(mediaItem, outputPath);
|
||||
TransformerTestRunner.runUntilCompleted(transformer);
|
||||
|
||||
verify(mockListener1, times(1)).onTransformationCompleted(eq(mediaItem), any());
|
||||
verify(mockListener2, times(1)).onTransformationCompleted(eq(mediaItem), any());
|
||||
verify(mockListener3, times(1)).onTransformationCompleted(eq(mediaItem), any());
|
||||
verify(mockListener1).onTransformationCompleted(eq(mediaItem), any());
|
||||
verify(mockListener2).onTransformationCompleted(eq(mediaItem), any());
|
||||
verify(mockListener3).onTransformationCompleted(eq(mediaItem), any());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -294,9 +293,9 @@ public final class TransformerEndToEndTest {
|
|||
transformer.startTransformation(mediaItem, outputPath);
|
||||
TransformationException exception = TransformerTestRunner.runUntilError(transformer);
|
||||
|
||||
verify(mockListener1, times(1)).onTransformationError(mediaItem, exception);
|
||||
verify(mockListener2, times(1)).onTransformationError(mediaItem, exception);
|
||||
verify(mockListener3, times(1)).onTransformationError(mediaItem, exception);
|
||||
verify(mockListener1).onTransformationError(mediaItem, exception);
|
||||
verify(mockListener2).onTransformationError(mediaItem, exception);
|
||||
verify(mockListener3).onTransformationError(mediaItem, exception);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -319,11 +318,11 @@ public final class TransformerEndToEndTest {
|
|||
transformer.startTransformation(mediaItem, outputPath);
|
||||
TransformerTestRunner.runUntilCompleted(transformer);
|
||||
|
||||
verify(mockListener1, times(1))
|
||||
verify(mockListener1)
|
||||
.onFallbackApplied(mediaItem, originalTransformationRequest, fallbackTransformationRequest);
|
||||
verify(mockListener2, times(1))
|
||||
verify(mockListener2)
|
||||
.onFallbackApplied(mediaItem, originalTransformationRequest, fallbackTransformationRequest);
|
||||
verify(mockListener3, times(1))
|
||||
verify(mockListener3)
|
||||
.onFallbackApplied(mediaItem, originalTransformationRequest, fallbackTransformationRequest);
|
||||
}
|
||||
|
||||
|
@ -345,9 +344,9 @@ public final class TransformerEndToEndTest {
|
|||
transformer2.startTransformation(mediaItem, outputPath);
|
||||
TransformerTestRunner.runUntilCompleted(transformer2);
|
||||
|
||||
verify(mockListener1, times(1)).onTransformationCompleted(eq(mediaItem), any());
|
||||
verify(mockListener1).onTransformationCompleted(eq(mediaItem), any());
|
||||
verify(mockListener2, never()).onTransformationCompleted(eq(mediaItem), any());
|
||||
verify(mockListener3, times(1)).onTransformationCompleted(eq(mediaItem), any());
|
||||
verify(mockListener3).onTransformationCompleted(eq(mediaItem), any());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -474,7 +473,7 @@ public final class TransformerEndToEndTest {
|
|||
|
||||
DumpFileAsserts.assertOutput(
|
||||
context, testMuxer, getDumpFileName(FILE_AUDIO_UNSUPPORTED_BY_MUXER + ".fallback"));
|
||||
verify(mockListener, times(1))
|
||||
verify(mockListener)
|
||||
.onFallbackApplied(mediaItem, originalTransformationRequest, fallbackTransformationRequest);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue