Home
last modified time | relevance | path

Searched refs:willThrow (Results 1 – 4 of 4) sorted by relevance

/external/mockito/src/test/java/org/mockitousage/
DCompilationWarningsTest.java54willThrow(new NullPointerException()).given(mock(IMethods.class)).objectReturningMethodNoArgs(); in no_warnings_for_most_common_api()
55willThrow(new NullPointerException(), new IllegalArgumentException()).given(mock(IMethods.class)).… in no_warnings_for_most_common_api()
56willThrow(NullPointerException.class).given(mock(IMethods.class)).objectReturningMethodNoArgs(); in no_warnings_for_most_common_api()
61 …willAnswer(ignore()).willThrow(new NullPointerException()).given(mock(IMethods.class)).objectRetur… in no_warnings_for_most_common_api()
62 …willAnswer(ignore()).willThrow(new NullPointerException(), new IllegalArgumentException()).given(m… in no_warnings_for_most_common_api()
63 …willAnswer(ignore()).willThrow(NullPointerException.class).given(mock(IMethods.class)).objectRetur… in no_warnings_for_most_common_api()
68 … given(mock(IMethods.class).objectReturningMethodNoArgs()).willThrow(new NullPointerException()); in no_warnings_for_most_common_api()
69 …given(mock(IMethods.class).objectReturningMethodNoArgs()).willThrow(new NullPointerException(), ne… in no_warnings_for_most_common_api()
70 … given(mock(IMethods.class).objectReturningMethodNoArgs()).willThrow(NullPointerException.class); in no_warnings_for_most_common_api()
75 …given(mock(IMethods.class).objectReturningMethodNoArgs()).will(ignore()).willThrow(new NullPointer… in no_warnings_for_most_common_api()
[all …]
/external/mockito/src/main/java/org/mockito/
DBDDMockito.java118 BDDMyOngoingStubbing<T> willThrow(Throwable... throwables); in willThrow() method
124 BDDMyOngoingStubbing<T> willThrow(Class<? extends Throwable> throwableType); in willThrow() method
132 …BDDMyOngoingStubbing<T> willThrow(Class<? extends Throwable> throwableType, Class<? extends Throwa… in willThrow() method
171 public BDDMyOngoingStubbing<T> willThrow(Throwable... throwables) { in willThrow() method in BDDMockito.BDDOngoingStubbingImpl
175 public BDDMyOngoingStubbing<T> willThrow(Class<? extends Throwable> throwableType) { in willThrow() method in BDDMockito.BDDOngoingStubbingImpl
179 …public BDDMyOngoingStubbing<T> willThrow(Class<? extends Throwable> throwableType, Class<? extends… in willThrow() method in BDDMockito.BDDOngoingStubbingImpl
372 BDDStubber willThrow(Throwable... toBeThrown); in willThrow() method
378 BDDStubber willThrow(Class<? extends Throwable> toBeThrown); in willThrow() method
385 …BDDStubber willThrow(Class<? extends Throwable> toBeThrown, Class<? extends Throwable>... nextToBe… in willThrow() method
440 public BDDStubber willThrow(Throwable... toBeThrown) { in willThrow() method in BDDMockito.BDDStubberImpl
[all …]
/external/mockito/src/test/java/org/mockitousage/customization/
DBDDMockitoTest.java41 given(mock.simpleMethod("foo")).willThrow(new SomethingWasWrong()); in should_stub_with_throwable()
52 given(mock.simpleMethod("foo")).willThrow(SomethingWasWrong.class); in should_stub_with_throwable_class()
65 … given(mock.simpleMethod("foo")).willThrow(SomethingWasWrong.class, AnotherThingWasWrong.class); in should_stub_with_throwable_classes()
129 willThrow(new SomethingWasWrong()).given(mock).voidMethod(); in should_stub_void()
140 willThrow(SomethingWasWrong.class).given(mock).voidMethod(); in should_stub_void_with_exception_class()
152 willThrow(SomethingWasWrong.class, AnotherThingWasWrong.class).given(mock).voidMethod(); in should_stub_void_with_exception_classes()
164 .willThrow(new SomethingWasWrong()) in should_stub_void_consecutively()
178 .willThrow(SomethingWasWrong.class) in should_stub_void_consecutively_with_exception_class()
/external/mockito/src/test/java/org/mockito/internal/handler/
DInvocationNotifierHandlerTest.java27 import static org.mockito.BDDMockito.willThrow;
90 given(mockHandler.handle(invocation)).willThrow(parseException); in should_notify_all_listeners_when_called_delegate_handler_throws_exception_and_rethrow_it()
105willThrow(new NullPointerException()).given(customListener).reportInvocation(any(MethodInvocationR… in should_report_listener_exception()