Commit 09d43114 by kimvde Committed by Marc Baechinger

Remove unnecessary exceptions in tests

PiperOrigin-RevId: 499160043
parent 220a5b9f
...@@ -325,7 +325,7 @@ public final class TransformerEndToEndTest { ...@@ -325,7 +325,7 @@ public final class TransformerEndToEndTest {
} }
@Test @Test
public void startTransformation_withMultipleListeners_callsEachOnError() throws Exception { public void startTransformation_withMultipleListeners_callsEachOnError() {
Transformer.Listener mockListener1 = mock(Transformer.Listener.class); Transformer.Listener mockListener1 = mock(Transformer.Listener.class);
Transformer.Listener mockListener2 = mock(Transformer.Listener.class); Transformer.Listener mockListener2 = mock(Transformer.Listener.class);
Transformer.Listener mockListener3 = mock(Transformer.Listener.class); Transformer.Listener mockListener3 = mock(Transformer.Listener.class);
...@@ -428,8 +428,7 @@ public final class TransformerEndToEndTest { ...@@ -428,8 +428,7 @@ public final class TransformerEndToEndTest {
} }
@Test @Test
public void startTransformation_withAudioEncoderFormatUnsupported_completesWithError() public void startTransformation_withAudioEncoderFormatUnsupported_completesWithError() {
throws Exception {
Transformer transformer = Transformer transformer =
createTransformerBuilder(/* enableFallback= */ false) createTransformerBuilder(/* enableFallback= */ false)
.setTransformationRequest( .setTransformationRequest(
...@@ -450,8 +449,7 @@ public final class TransformerEndToEndTest { ...@@ -450,8 +449,7 @@ public final class TransformerEndToEndTest {
} }
@Test @Test
public void startTransformation_withAudioDecoderFormatUnsupported_completesWithError() public void startTransformation_withAudioDecoderFormatUnsupported_completesWithError() {
throws Exception {
Transformer transformer = Transformer transformer =
createTransformerBuilder(/* enableFallback= */ false) createTransformerBuilder(/* enableFallback= */ false)
.setTransformationRequest( .setTransformationRequest(
...@@ -471,7 +469,7 @@ public final class TransformerEndToEndTest { ...@@ -471,7 +469,7 @@ public final class TransformerEndToEndTest {
} }
@Test @Test
public void startTransformation_withIoError_completesWithError() throws Exception { public void startTransformation_withIoError_completesWithError() {
Transformer transformer = createTransformerBuilder(/* enableFallback= */ false).build(); Transformer transformer = createTransformerBuilder(/* enableFallback= */ false).build();
MediaItem mediaItem = MediaItem.fromUri("asset:///non-existing-path.mp4"); MediaItem mediaItem = MediaItem.fromUri("asset:///non-existing-path.mp4");
...@@ -527,7 +525,7 @@ public final class TransformerEndToEndTest { ...@@ -527,7 +525,7 @@ public final class TransformerEndToEndTest {
} }
@Test @Test
public void startTransformation_withSlowOutputSampleRate_completesWithError() throws Exception { public void startTransformation_withSlowOutputSampleRate_completesWithError() {
MediaSource.Factory mediaSourceFactory = MediaSource.Factory mediaSourceFactory =
new DefaultMediaSourceFactory( new DefaultMediaSourceFactory(
context, new SlowExtractorsFactory(/* delayBetweenReadsMs= */ 10)); context, new SlowExtractorsFactory(/* delayBetweenReadsMs= */ 10));
...@@ -650,8 +648,7 @@ public final class TransformerEndToEndTest { ...@@ -650,8 +648,7 @@ public final class TransformerEndToEndTest {
} }
@Test @Test
public void startTransformation_withAssetLoaderNotDecodingAndDecodingNeeded_completesWithError() public void startTransformation_withAssetLoaderNotDecodingAndDecodingNeeded_completesWithError() {
throws Exception {
Transformer transformer = Transformer transformer =
createTransformerBuilder(/* enableFallback= */ false) createTransformerBuilder(/* enableFallback= */ false)
.setAudioProcessors(ImmutableList.of(new SonicAudioProcessor())) .setAudioProcessors(ImmutableList.of(new SonicAudioProcessor()))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment