Searched refs:willThrow (Results 1 – 4 of 4) sorted by relevance
54 … willThrow(new NullPointerException()).given(mock(IMethods.class)).objectReturningMethodNoArgs(); in no_warnings_for_most_common_api()55 …willThrow(new NullPointerException(), new IllegalArgumentException()).given(mock(IMethods.class)).… in no_warnings_for_most_common_api()56 … willThrow(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 …]
118 BDDMyOngoingStubbing<T> willThrow(Throwable... throwables); in willThrow() method124 BDDMyOngoingStubbing<T> willThrow(Class<? extends Throwable> throwableType); in willThrow() method132 …BDDMyOngoingStubbing<T> willThrow(Class<? extends Throwable> throwableType, Class<? extends Throwa… in willThrow() method171 public BDDMyOngoingStubbing<T> willThrow(Throwable... throwables) { in willThrow() method in BDDMockito.BDDOngoingStubbingImpl175 public BDDMyOngoingStubbing<T> willThrow(Class<? extends Throwable> throwableType) { in willThrow() method in BDDMockito.BDDOngoingStubbingImpl179 …public BDDMyOngoingStubbing<T> willThrow(Class<? extends Throwable> throwableType, Class<? extends… in willThrow() method in BDDMockito.BDDOngoingStubbingImpl372 BDDStubber willThrow(Throwable... toBeThrown); in willThrow() method378 BDDStubber willThrow(Class<? extends Throwable> toBeThrown); in willThrow() method385 …BDDStubber willThrow(Class<? extends Throwable> toBeThrown, Class<? extends Throwable>... nextToBe… in willThrow() method440 public BDDStubber willThrow(Throwable... toBeThrown) { in willThrow() method in BDDMockito.BDDStubberImpl[all …]
41 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()
27 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()105 …willThrow(new NullPointerException()).given(customListener).reportInvocation(any(MethodInvocationR… in should_report_listener_exception()