diff options
| author | 2018-09-07 09:43:24 -0700 | |
|---|---|---|
| committer | 2018-09-07 09:43:24 -0700 | |
| commit | 709b9ee4e65fcb19a257f60ed54315931f761b09 (patch) | |
| tree | 228156e296565d168a4777f263205c9b8181a23d | |
| parent | 645537e52239eb1eebc31e27b742f22a66c0dc15 (diff) | |
| parent | de5e2f221d230ebfd5e2d3c3835c1037ef816df6 (diff) | |
Fix usage of internal mockito API am: 404b021b1f
am: de5e2f221d
Change-Id: Ic9f7c25c950ebf20aa0a0e27456b5eb7b9044399
| -rw-r--r-- | tests/TtsTests/src/com/android/speech/tts/TextToSpeechTests.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/TtsTests/src/com/android/speech/tts/TextToSpeechTests.java b/tests/TtsTests/src/com/android/speech/tts/TextToSpeechTests.java index 918873bf0bdd..d9bb7db17685 100644 --- a/tests/TtsTests/src/com/android/speech/tts/TextToSpeechTests.java +++ b/tests/TtsTests/src/com/android/speech/tts/TextToSpeechTests.java @@ -28,6 +28,7 @@ import org.mockito.internal.stubbing.StubberImpl; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; import org.mockito.stubbing.Stubber; +import org.mockito.quality.Strictness; import junit.framework.Assert; import java.util.Locale; @@ -210,12 +211,16 @@ public class TextToSpeechTests extends InstrumentationTestCase { } public static abstract class CountDownBehaviour extends StubberImpl { + public CountDownBehaviour(Strictness strictness) { + super(strictness); + } + /** Used to mock methods that return a result. */ public abstract Stubber andReturn(Object result); } public static CountDownBehaviour doCountDown(final CountDownLatch latch) { - return new CountDownBehaviour() { + return new CountDownBehaviour(Strictness.WARN) { @Override public <T> T when(T mock) { return Mockito.doAnswer(new Answer<Void>() { @@ -229,7 +234,7 @@ public class TextToSpeechTests extends InstrumentationTestCase { @Override public Stubber andReturn(final Object result) { - return new StubberImpl() { + return new StubberImpl(Strictness.WARN) { @Override public <T> T when(T mock) { return Mockito.doAnswer(new Answer<Object>() { |