/external/dagger2/producers/src/test/java/dagger/producers/monitoring/internal/ |
D | MonitorsTest.java | 32 import static org.mockito.Mockito.doThrow; 76 doThrow(new RuntimeException("monkey")) in singleMonitor_throwingProductionComponentMonitorFactory() 103 doThrow(new RuntimeException("monkey")) in singleMonitor_throwingProductionComponentMonitor() 159 doThrow(new RuntimeException("monkey")).when(mockProducerMonitor).methodStarting(); in singleMonitor_throwingProducerMonitorSuccess() 160 doThrow(new RuntimeException("monkey")).when(mockProducerMonitor).methodFinished(); in singleMonitor_throwingProducerMonitorSuccess() 161 doThrow(new RuntimeException("monkey")).when(mockProducerMonitor).succeeded(any(Object.class)); in singleMonitor_throwingProducerMonitorSuccess() 183 doThrow(new RuntimeException("monkey")).when(mockProducerMonitor).methodStarting(); in singleMonitor_throwingProducerMonitorFailure() 184 doThrow(new RuntimeException("monkey")).when(mockProducerMonitor).methodFinished(); in singleMonitor_throwingProducerMonitorFailure() 185 doThrow(new RuntimeException("monkey")).when(mockProducerMonitor).failed(any(Throwable.class)); in singleMonitor_throwingProducerMonitorFailure() 220 doThrow(new RuntimeException("monkey")) in multipleMonitors_throwingProductionComponentMonitorFactories() [all …]
|
/external/mockito/src/test/java/org/mockitousage/stubbing/ |
D | StubbingWithThrowablesTest.java | 13 import static org.mockito.Mockito.doThrow; 65 doThrow(expected).when(mock).clear(); in shouldSetThrowableToVoidMethod() 75 doThrow(new ExceptionOne()).when(mock).clear(); in shouldLastStubbingVoidBeImportant() 76 doThrow(new ExceptionTwo()).when(mock).clear(); in shouldLastStubbingVoidBeImportant() 134 doThrow(NaughtyException.class).when(mock).add(null); in shouldInstantiateExceptionClassWithOngoingStubbingOnInteraction() 194 doThrow((Class) null).when(mock).isEmpty(); in doThrowShouldNotAllowSettingNullThrowableClass() 202 doThrow(RuntimeException.class, (Class) null).when(mock).isEmpty(); in doThrowShouldNotAllowSettingNullThrowableClasses() 210 doThrow(RuntimeException.class, (Class[]) null).when(mock).isEmpty(); in doThrowShouldNotAllowSettingNullVarArgThrowableClasses() 255 doThrow(new ExceptionTwo()).when(mock).clear(); in shouldMixThrowablesAndReturnsOnDifferentMocks() 257 doThrow(new ExceptionThree()).when(mockTwo).clear(); in shouldMixThrowablesAndReturnsOnDifferentMocks() [all …]
|
D | StubbingUsingDoReturnTest.java | 57 doThrow(new FooRuntimeException()).when(mock).voidMethod(); in should_stub_with_throwable() 66 doThrow(new IOException()).when(mock).throwsIOException(0); in should_allow_setting_valid_checked_exception() 79 doThrow(new FooCheckedException()).when(mock).throwsIOException(0); in should_detect_invalid_checked_exception() 121 .doThrow(new RuntimeException()) in should_allow_chained_stubbing() 138 .doThrow(new RuntimeException()) in should_allow_consecutive_return_values() 167 doReturn("whatever").doThrow(IllegalArgumentException.class).when(mock).simpleMethod(); in should_allow_chained_stubbing_with_exception_class() 177 .doThrow(new RuntimeException()) in should_allow_chained_stubbing_on_void_methods()
|
D | StubbingConsecutiveAnswersTest.java | 213 doThrow(new IllegalArgumentException()) in should_stub_void_method_and_continue_throwing() 215 .doThrow(new NullPointerException()) in should_stub_void_method_and_continue_throwing() 239 .doThrow(new NullPointerException()) in should_stub_void_method() 258 .doThrow(new Exception()) in should_validate_consecutive_exception_for_void_method()
|
D | BasicStubbingTest.java | 64 doThrow(new RuntimeException()).when(mock).simpleMethod("two"); in should_stubbing_not_be_treated_as_interaction()
|
/external/mockito/src/test/java/org/mockito/verification/ |
D | TimeoutTest.java | 48 doThrow(error). in should_fail_because_verification_fails() 49 doThrow(error). in should_fail_because_verification_fails() 50 doThrow(error). in should_fail_because_verification_fails() 66 doThrow(error). in should_pass_even_if_first_verification_fails() 67 doThrow(error). in should_pass_even_if_first_verification_fails() 79 doThrow(error).when(mode).verify(data); in should_try_to_verify_correct_number_of_times()
|
/external/mockito/src/main/java/org/mockito/internal/stubbing/ |
D | StubberImpl.java | 66 public Stubber doThrow(Throwable... toBeThrown) { in doThrow() method in StubberImpl 78 public Stubber doThrow(Class<? extends Throwable> toBeThrown) { in doThrow() method in StubberImpl 90 return doThrow(e); in doThrow() 94 …public Stubber doThrow(Class<? extends Throwable> toBeThrown, Class<? extends Throwable>... nextTo… in doThrow() method in StubberImpl 95 Stubber stubber = doThrow(toBeThrown); in doThrow() 103 stubber = stubber.doThrow(next); in doThrow()
|
/external/mockito/src/test/java/org/mockitousage/ |
D | CompilationWarningsTest.java | 26 … doThrow(new NullPointerException()).when(mock(IMethods.class)).objectReturningMethodNoArgs(); in no_warnings_for_most_common_api() 27 …doThrow(new NullPointerException(), new IllegalArgumentException()).when(mock(IMethods.class)).obj… in no_warnings_for_most_common_api() 28 … doThrow(NullPointerException.class).when(mock(IMethods.class)).objectReturningMethodNoArgs(); in no_warnings_for_most_common_api() 33 …doAnswer(ignore()).doThrow(new NullPointerException()).when(mock(IMethods.class)).objectReturningM… in no_warnings_for_most_common_api() 34 …doAnswer(ignore()).doThrow(new NullPointerException(), new IllegalArgumentException()).when(mock(I… in no_warnings_for_most_common_api() 35 …doAnswer(ignore()).doThrow(NullPointerException.class).when(mock(IMethods.class)).objectReturningM… in no_warnings_for_most_common_api() 83 …doThrow(NullPointerException.class, IllegalArgumentException.class).when(mock(IMethods.class)).obj… in heap_pollution_JDK7plus_warning_avoided_BUT_now_unchecked_generic_array_creation_warnings_ON_JDK5plus_environment() 85 …doAnswer(ignore()).doThrow(NullPointerException.class, IllegalArgumentException.class).when(mock(I… in heap_pollution_JDK7plus_warning_avoided_BUT_now_unchecked_generic_array_creation_warnings_ON_JDK5plus_environment()
|
/external/mockito/src/test/java/org/mockito/internal/verification/ |
D | VerificationOverTimeImplTest.java | 17 import static org.mockito.Mockito.doThrow; 46 doThrow(toBeThrown).when(delegate).verify(null); in should_throw_mockito_assertion_error() 56 doThrow(toBeThrown).when(delegate).verify(null); in should_deal_with_junit_assertion_error() 65 doThrow(toBeThrown).when(delegate).verify(null); in should_not_wrap_other_exceptions()
|
D | DescriptionTest.java | 16 import static org.mockito.Mockito.doThrow; 43 doThrow(error).when(mockVerificationMode).verify(mockVerificationData); in verification_failure_should_prepend_expected_message()
|
/external/mockito/src/main/java/org/mockito/stubbing/ |
D | Stubber.java | 86 Stubber doThrow(Throwable... toBeThrown); in doThrow() method 102 Stubber doThrow(Class<? extends Throwable> toBeThrown); in doThrow() method 121 …Stubber doThrow(Class<? extends Throwable> toBeThrown, Class<? extends Throwable>... nextToBeThrow… in doThrow() method
|
/external/volley/src/test/java/com/android/volley/toolbox/ |
D | BasicNetworkTest.java | 52 import static org.mockito.Mockito.doThrow; 165 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in socketTimeout() 181 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in noConnection() 198 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in unauthorized() 215 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in forbidden() 233 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in redirect() 257 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in otherClientError() 279 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in serverError_enableRetries() 299 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in serverError_disableRetries()
|
D | DiskBasedCacheTest.java | 60 import static org.mockito.Mockito.doThrow; 286 doThrow(IOException.class).when(mockedOutputStream).write(anyInt()); in testFileIsDeletedWhenWriteHeaderFails() 314 doThrow(IOException.class).when(mockedInputStream).read(); in testIOExceptionInInitialize()
|
/external/mockito/src/main/java/org/mockito/ |
D | BDDMockito.java | 441 return new BDDStubberImpl(mockitoStubber.doThrow(toBeThrown)); in willThrow() 445 return new BDDStubberImpl(mockitoStubber.doThrow(toBeThrown)); in willThrow() 449 return new BDDStubberImpl(mockitoStubber.doThrow(toBeThrown, nextToBeThrown)); in willThrow() 462 return new BDDStubberImpl(Mockito.doThrow(toBeThrown)); in willThrow() 470 return new BDDStubberImpl(Mockito.doThrow(toBeThrown)); in willThrow() 478 return new BDDStubberImpl(Mockito.doThrow(toBeThrown, throwableTypes)); in willThrow()
|
D | Mockito.java | 2230 public static Stubber doThrow(Throwable... toBeThrown) { in doThrow() method in Mockito 2231 return MOCKITO_CORE.stubber().doThrow(toBeThrown); in doThrow() 2253 public static Stubber doThrow(Class<? extends Throwable> toBeThrown) { in doThrow() method in Mockito 2254 return MOCKITO_CORE.stubber().doThrow(toBeThrown); in doThrow() 2280 …public static Stubber doThrow(Class<? extends Throwable> toBeThrown, Class<? extends Throwable>...… in doThrow() method in Mockito 2281 return MOCKITO_CORE.stubber().doThrow(toBeThrown, toBeThrownNext); in doThrow()
|
/external/guava/guava-testlib/test/com/google/common/testing/ |
D | NullPointerTesterTest.java | 385 public static void doThrow(Object arg) { in doThrow() method in NullPointerTesterTest.PassObject 395 public void oneNullableArgThrows(@Nullable String s) { doThrow(s); } in oneNullableArgThrows() 400 checkNotNull(s); doThrow(i); in twoMixedArgsThrows() 404 checkNotNull(s); doThrow(i); in twoMixedArgsThrows() 410 doThrow(s); in twoNullableArgsThrowsFirstArg() 414 doThrow(i); in twoNullableArgsThrowsSecondArg() 419 doThrow(s); in staticOneNullableArgThrows() 439 doThrow(s); // Fail: throwing non-NPE exception for null s in oneArg() 470 doThrow(s); // Fail: throwing non-NPE exception for null s in twoArg() 493 doThrow(i); // Fail: throwing non-NPE exception for null i in twoArg() [all …]
|
/external/guice/extensions/persist/test/com/google/inject/persist/jpa/ |
D | JpaPersistServiceTest.java | 22 import static org.mockito.Mockito.doThrow; 53 doThrow(SimulatedException.class).when(entityManager).close(); in test_givenErrorOnEntityManagerClose_whenEndIsCalled_thenEntityManagerIsRemoved()
|
/external/mockito/src/test/java/org/mockito/internal/ |
D | InvalidStateDetectionTest.java | 138 doThrow(new RuntimeException()).when(mock); in shouldCorrectStateAfterDetectingUnfinishedStubbing() 141 doThrow(new RuntimeException()).when(mock).oneArg(true); in shouldCorrectStateAfterDetectingUnfinishedStubbing() 145 doThrow(new RuntimeException()).when(mock).oneArg(true); in shouldCorrectStateAfterDetectingUnfinishedStubbing()
|
/external/mockito/src/test/java/org/mockitousage/spies/ |
D | PartialMockingWithSpiesTest.java | 15 import static org.mockito.Mockito.doThrow; 92 doThrow(new RuntimeException("appetite for destruction")) in shouldAllowStubbingWithThrowablesMethodsThatDelegateToOtherMethods()
|
/external/neven/ |
D | FaceDetector_jni.cpp | 86 static void doThrow(JNIEnv* env, const char* exc, const char* msg = NULL) in doThrow() function 144 doThrow(_env, "java/lang/OutOfMemoryError", NULL); in initialize() 163 doThrow(_env, "java/lang/OutOfMemoryError", NULL); in initialize()
|
/external/mockito/src/test/java/org/mockito/internal/handler/ |
D | MockHandlerImplTest.java | 32 import static org.mockito.Mockito.doThrow; 72 …doThrow(new Throwable()).when(throwingListener).reportInvocation(any(MethodInvocationReport.class)… in should_throw_mockito_exception_when_invocation_handler_throws_anything()
|
/external/mockito/src/test/java/org/mockitousage/debugging/ |
D | InvocationListenerCallbackTest.java | 22 import static org.mockito.Mockito.doThrow; 102 doThrow(new OvenNotWorking()).when(foo).doSomething("cook"); in should_call_all_listener_when_mock_throws_exception()
|
/external/guava/guava-tests/test/com/google/common/util/concurrent/ |
D | FutureCallbackTest.java | 105 Mockito.doThrow(exception).when(callback).onSuccess(result); in testOnSuccessThrowsRuntimeException() 120 Mockito.doThrow(error).when(callback).onSuccess(result); in testOnSuccessThrowsError()
|
/external/mockito/src/test/java/org/mockitousage/matchers/ |
D | VerificationAndStubbingUsingMatchersTest.java | 53 doThrow(new RuntimeException()).when(one).oneArg(true); in shouldVerifyUsingMatchers()
|
/external/mockito/src/test/java/org/mockitousage/basicapi/ |
D | ResetTest.java | 76 doThrow(new RuntimeException()).when(mock).simpleMethod("two"); in shouldStubbingNotBeTreatedAsInteraction()
|