/external/mockito/src/main/java/org/mockito/internal/stubbing/ |
D | DefaultLenientStubber.java | 19 public Stubber doThrow(Throwable... toBeThrown) { in doThrow() method in DefaultLenientStubber 20 return stubber().doThrow(toBeThrown); in doThrow() 24 public Stubber doThrow(Class<? extends Throwable> toBeThrown) { in doThrow() method in DefaultLenientStubber 25 return stubber().doThrow(toBeThrown); in doThrow() 29 …public Stubber doThrow(Class<? extends Throwable> toBeThrown, Class<? extends Throwable>... nextTo… in doThrow() method in DefaultLenientStubber 30 return stubber().doThrow(toBeThrown, nextToBeThrown); in doThrow()
|
D | StubberImpl.java | 73 public Stubber doThrow(Throwable... toBeThrown) { in doThrow() method in StubberImpl 85 public Stubber doThrow(Class<? extends Throwable> toBeThrown) { in doThrow() method in StubberImpl 97 return doThrow(e); in doThrow() 101 …public Stubber doThrow(Class<? extends Throwable> toBeThrown, Class<? extends Throwable>... nextTo… in doThrow() method in StubberImpl 102 Stubber stubber = doThrow(toBeThrown); in doThrow() 110 stubber = stubber.doThrow(next); in doThrow()
|
/external/dagger2/javatests/dagger/producers/monitoring/internal/ |
D | MonitorsTest.java | 22 import static org.mockito.Mockito.doThrow; 78 doThrow(new RuntimeException("monkey")) in singleMonitor_throwingProductionComponentMonitorFactory() 105 doThrow(new RuntimeException("monkey")) in singleMonitor_throwingProductionComponentMonitor() 165 doThrow(new RuntimeException("monkey")).when(mockProducerMonitor).requested(); in singleMonitor_throwingProducerMonitorSuccess() 166 doThrow(new RuntimeException("monkey")).when(mockProducerMonitor).methodStarting(); in singleMonitor_throwingProducerMonitorSuccess() 167 doThrow(new RuntimeException("monkey")).when(mockProducerMonitor).methodFinished(); in singleMonitor_throwingProducerMonitorSuccess() 168 doThrow(new RuntimeException("monkey")) in singleMonitor_throwingProducerMonitorSuccess() 194 doThrow(new RuntimeException("monkey")).when(mockProducerMonitor).requested(); in singleMonitor_throwingProducerMonitorFailure() 195 doThrow(new RuntimeException("monkey")).when(mockProducerMonitor).methodStarting(); in singleMonitor_throwingProducerMonitorFailure() 196 doThrow(new RuntimeException("monkey")).when(mockProducerMonitor).methodFinished(); in singleMonitor_throwingProducerMonitorFailure() [all …]
|
/external/mockito/src/test/java/org/mockitousage/stubbing/ |
D | StubbingWithThrowablesTest.java | 13 import static org.mockito.Mockito.doThrow; 77 doThrow(new ExceptionOne()).when(mock).clear(); in throws_same_exception_consecutively_with_doThrow() 109 doThrow(expected).when(mock).clear(); in shouldSetThrowableToVoidMethod() 119 doThrow(new ExceptionOne()).when(mock).clear(); in shouldLastStubbingVoidBeImportant() 120 doThrow(new ExceptionTwo()).when(mock).clear(); in shouldLastStubbingVoidBeImportant() 178 doThrow(NaughtyException.class).when(mock).add(null); in shouldInstantiateExceptionClassWithOngoingStubbingOnInteraction() 238 doThrow((Class) null).when(mock).isEmpty(); in doThrowShouldNotAllowSettingNullThrowableClass() 246 doThrow(RuntimeException.class, (Class) null).when(mock).isEmpty(); in doThrowShouldNotAllowSettingNullThrowableClasses() 254 doThrow(RuntimeException.class, (Class[]) null).when(mock).isEmpty(); in doThrowShouldNotAllowSettingNullVarArgThrowableClasses() 299 doThrow(new ExceptionTwo()).when(mock).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 | 241 doThrow(new IllegalArgumentException()) in should_stub_void_method_and_continue_throwing() 243 .doThrow(new NullPointerException()) in should_stub_void_method_and_continue_throwing() 267 .doThrow(new NullPointerException()) in should_stub_void_method() 286 .doThrow(new Exception()) in should_validate_consecutive_exception_for_void_method()
|
/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/dexmaker/dexmaker-mockito-inline-extended/src/main/java/com/android/dx/mockito/inline/extended/ |
D | StaticCapableStubber.java | 156 public StaticCapableStubber doThrow(Throwable... toBeThrown) { in doThrow() method in StaticCapableStubber 157 instanceStubber = instanceStubber.doThrow(toBeThrown); in doThrow() 162 public StaticCapableStubber doThrow(Class<? extends Throwable> toBeThrown) { in doThrow() method in StaticCapableStubber 163 instanceStubber = instanceStubber.doThrow(toBeThrown); in doThrow() 169 public final StaticCapableStubber doThrow(Class<? extends Throwable> toBeThrown, in doThrow() method in StaticCapableStubber 171 instanceStubber = instanceStubber.doThrow(toBeThrown, nextToBeThrown); in doThrow()
|
D | ExtendedMockito.java | 122 public static StaticCapableStubber doThrow(Class<? extends Throwable> toBeThrown) { in doThrow() method in ExtendedMockito 123 return new StaticCapableStubber(Mockito.doThrow(toBeThrown)); in doThrow() 132 public static StaticCapableStubber doThrow(Class<? extends Throwable> toBeThrown, in doThrow() method in ExtendedMockito 134 return new StaticCapableStubber(Mockito.doThrow(toBeThrown, toBeThrownNext)); in doThrow() 142 public static StaticCapableStubber doThrow(Throwable... toBeThrown) { in doThrow() method in ExtendedMockito 143 return new StaticCapableStubber(Mockito.doThrow(toBeThrown)); 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 | BaseStubber.java | 31 Stubber doThrow(Throwable... toBeThrown); in doThrow() method 47 Stubber doThrow(Class<? extends Throwable> toBeThrown); in doThrow() method 66 …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 | 23 import static org.mockito.Mockito.doThrow; 169 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in socketTimeout() 186 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in noConnectionDefault() 204 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in noConnectionRetry() 223 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in noConnectionNoRetry() 241 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in unauthorized() 259 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in forbidden() 278 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in redirect() 303 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in otherClientError() 325 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in serverError_enableRetries() [all …]
|
D | BasicAsyncNetworkTest.java | 24 import static org.mockito.Mockito.doThrow; 207 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in socketTimeout() 224 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in noConnectionDefault() 242 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in noConnectionRetry() 260 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in noConnectionNoRetry() 278 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in unauthorized() 295 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in malformedUrlRequest() 308 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in forbidden() 327 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in redirect() 356 doThrow(new VolleyError()).when(mMockRetryPolicy).retry(any(VolleyError.class)); in otherClientError() [all …]
|
/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 | 2273 public static Stubber doThrow(Throwable... toBeThrown) { in doThrow() method in Mockito 2274 return MOCKITO_CORE.stubber().doThrow(toBeThrown); in doThrow() 2296 public static Stubber doThrow(Class<? extends Throwable> toBeThrown) { in doThrow() method in Mockito 2297 return MOCKITO_CORE.stubber().doThrow(toBeThrown); in doThrow() 2323 …public static Stubber doThrow(Class<? extends Throwable> toBeThrown, Class<? extends Throwable>...… in doThrow() method in Mockito 2324 return MOCKITO_CORE.stubber().doThrow(toBeThrown, toBeThrownNext); in doThrow()
|
/external/mockito/src/test/java/org/mockitousage/strictness/ |
D | StrictnessPerStubbingTest.java | 91 .doThrow(IllegalArgumentException.class) in doThrow_syntax() 92 .doThrow(IllegalStateException.class) in doThrow_syntax() 117 .doThrow(IllegalArgumentException.class, IllegalStateException.class) in doThrow_vararg_syntax() 142 .doThrow(new IllegalArgumentException(), new IllegalStateException()) in doThrow_instance_vararg_syntax()
|
/external/guava/android/guava-testlib/test/com/google/common/testing/ |
D | NullPointerTesterTest.java | 455 public static void doThrow(Object arg) { in doThrow() method in NullPointerTesterTest.PassObject 478 doThrow(s); in oneNullableArgThrows() 496 doThrow(i); in twoMixedArgsThrows() 501 doThrow(i); in twoMixedArgsThrows() 507 doThrow(s); in twoNullableArgsThrowsFirstArg() 511 doThrow(i); in twoNullableArgsThrowsSecondArg() 521 doThrow(s); in staticOneNullableArgThrows() 543 doThrow(s); // Fail: throwing non-NPE exception for null s in oneArg() 577 doThrow(s); // Fail: throwing non-NPE exception for null s in twoArg() 602 doThrow(i); // Fail: throwing non-NPE exception for null i in twoArg() [all …]
|
/external/guava/guava-testlib/test/com/google/common/testing/ |
D | NullPointerTesterTest.java | 508 public static void doThrow(Object arg) { in doThrow() method in NullPointerTesterTest.PassObject 531 doThrow(s); in oneNullableArgThrows() 549 doThrow(i); in twoMixedArgsThrows() 554 doThrow(i); in twoMixedArgsThrows() 560 doThrow(s); in twoNullableArgsThrowsFirstArg() 564 doThrow(i); in twoNullableArgsThrowsSecondArg() 574 doThrow(s); in staticOneNullableArgThrows() 596 doThrow(s); // Fail: throwing non-NPE exception for null s in oneArg() 630 doThrow(s); // Fail: throwing non-NPE exception for null s in twoArg() 655 doThrow(i); // Fail: throwing non-NPE exception for null i in twoArg() [all …]
|
/external/guava/android/guava-tests/test/com/google/common/io/ |
D | FlushablesTest.java | 19 import static org.mockito.Mockito.doThrow; 74 doThrow( in setupFlushable()
|
/external/guava/guava-tests/test/com/google/common/io/ |
D | FlushablesTest.java | 19 import static org.mockito.Mockito.doThrow; 74 doThrow( in setupFlushable()
|
/external/guice/extensions/persist/test/com/google/inject/persist/jpa/ |
D | JpaPersistServiceTest.java | 21 import static org.mockito.Mockito.doThrow; 54 doThrow(SimulatedException.class).when(entityManager).close(); in test_givenErrorOnEntityManagerClose_whenEndIsCalled_thenEntityManagerIsRemoved()
|
/external/dagger2/javatests/dagger/producers/monitoring/ |
D | TimingRecordersTest.java | 23 import static org.mockito.Mockito.doThrow; 166 doThrow(new RuntimeException("monkey")) in singleRecorder_throwingProducerTimingRecorderSuccess() 169 doThrow(new RuntimeException("monkey")) in singleRecorder_throwingProducerTimingRecorderSuccess() 310 doThrow(new RuntimeException("monkey")) in multipleRecorders_someThrowingProducerTimingRecordersSuccess() 313 doThrow(new RuntimeException("monkey")) in multipleRecorders_someThrowingProducerTimingRecordersSuccess() 316 doThrow(new RuntimeException("monkey")) in multipleRecorders_someThrowingProducerTimingRecordersSuccess()
|
/external/mockito/src/test/java/org/mockito/internal/ |
D | InvalidStateDetectionTest.java | 141 doThrow(new RuntimeException()).when(mock); in shouldCorrectStateAfterDetectingUnfinishedStubbing() 144 doThrow(new RuntimeException()).when(mock).oneArg(true); in shouldCorrectStateAfterDetectingUnfinishedStubbing() 148 doThrow(new RuntimeException()).when(mock).oneArg(true); in shouldCorrectStateAfterDetectingUnfinishedStubbing()
|