OpenGrok
Home
Sort by relevance
Sort by last modified time
Full Search
Definition
Symbol
File Path
History
|
|
Help
Searched
refs:thenThrow
(Results
1 - 25
of
68
) sorted by null
1
2
3
/external/mockito/src/main/java/org/mockito/internal/stubbing/
BaseStubbing.java
36
private OngoingStubbing<T>
thenThrow
(Throwable throwable) {
41
public OngoingStubbing<T>
thenThrow
(Throwable... throwables) {
43
return
thenThrow
((Throwable) null);
48
stubbing =
thenThrow
(t);
50
stubbing = stubbing.
thenThrow
(t);
57
public OngoingStubbing<T>
thenThrow
(Class<? extends Throwable> throwableType) {
62
return
thenThrow
(newInstance(throwableType));
66
public OngoingStubbing<T>
thenThrow
(Class<? extends Throwable> toBeThrown, Class<? extends Throwable>... nextToBeThrown) {
68
thenThrow
((Class<Throwable>) null);
70
OngoingStubbing<T> stubbing =
thenThrow
(toBeThrown)
[
all
...]
/external/mockito/src/main/java/org/mockito/stubbing/
OngoingStubbing.java
19
* when(mock.someMethod("some arg")).
thenThrow
(new RuntimeException());
24
* .
thenThrow
(new RuntimeException())
29
* when(mock.otherMethod()).
thenThrow
(exc1, exc2);
72
* when(mock.someMethod()).
thenThrow
(new RuntimeException());
89
OngoingStubbing<T>
thenThrow
(Throwable... throwables);
94
* when(mock.someMethod()).
thenThrow
(RuntimeException.class);
107
* use {@link OngoingStubbing#
thenThrow
(Throwable...)} instead.
114
OngoingStubbing<T>
thenThrow
(Class<? extends Throwable> throwableType);
119
* when(mock.someMethod()).
thenThrow
(RuntimeException.class);
136
* this API is safe to use. If you don't want to see this warning it is possible to chain {@link #
thenThrow
(Class)
[
all
...]
/external/mockito/src/test/java/org/mockitousage/stubbing/
StubbingWithThrowablesTest.java
54
when(mock.add("throw")).
thenThrow
(expected);
85
when(mock.size()).
thenThrow
(new ExceptionOne());
89
when(mock.size()).
thenThrow
(new ExceptionTwo());
97
when(reader.read()).
thenThrow
(ioException);
108
when(mock.add("quake")).
thenThrow
(error);
120
when(mock.add(null)).
thenThrow
((Exception) null);
125
when(mock.add(null)).
thenThrow
(NaughtyException.class);
146
when(mock.add("monkey island")).
thenThrow
(new Exception());
154
when(mock.add("monkey island")).
thenThrow
((Throwable) null);
162
when(mock.add("monkey island")).
thenThrow
((Throwable[]) null)
[
all
...]
StubbingConsecutiveAnswersTest.java
59
.
thenThrow
(new NullPointerException(), new RuntimeException())
61
.
thenThrow
(new IllegalArgumentException());
83
when(mock.simpleMethod()).
thenThrow
(new RuntimeException())
84
.
thenThrow
(new IllegalArgumentException())
85
.
thenThrow
(new NullPointerException());
110
when(mock.simpleMethod()).
thenThrow
(new RuntimeException(),
138
when(mock.simpleMethod()).
thenThrow
(IllegalArgumentException.class);
155
when(mock.simpleMethod()).
thenThrow
(RuntimeException.class,
183
.
thenThrow
(new IllegalArgumentException())
185
.
thenThrow
(new NullPointerException()
[
all
...]
BasicStubbingTest.java
63
when(mock.simpleMethod("one")).
thenThrow
(new RuntimeException());
/external/mockito/src/test/java/org/mockitousage/bugs/
NPEWhenCustomExceptionStackTraceReturnNullTest.java
30
when(mock.simpleMethod()).
thenThrow
(new NullStackTraceException());
NPEWhenMockingThrowablesTest.java
28
when(mock.simpleMethod()).
thenThrow
(mock2);
/external/mockito/src/test/java/org/mockitousage/misuse/
InvalidUsageTest.java
59
when(mock.simpleMethod()).
thenThrow
(new Exception());
64
when(mock.simpleMethod()).
thenThrow
(new Throwable[] {null});
70
when(mock.simpleMethod()).
thenThrow
((Throwable) null);
75
when(mock.simpleMethod()).
thenThrow
(new RuntimeException(), null);
/external/mockito/src/test/java/org/mockitousage/
CompilationWarningsTest.java
40
when(mock(IMethods.class).objectReturningMethodNoArgs()).
thenThrow
(new NullPointerException());
41
when(mock(IMethods.class).objectReturningMethodNoArgs()).
thenThrow
(new NullPointerException(), new IllegalArgumentException());
42
when(mock(IMethods.class).objectReturningMethodNoArgs()).
thenThrow
(NullPointerException.class);
47
when(mock(IMethods.class).objectReturningMethodNoArgs()).then(ignore()).
thenThrow
(new NullPointerException());
48
when(mock(IMethods.class).objectReturningMethodNoArgs()).then(ignore()).
thenThrow
(new NullPointerException(), new IllegalArgumentException());
49
when(mock(IMethods.class).objectReturningMethodNoArgs()).then(ignore()).
thenThrow
(NullPointerException.class);
84
when(mock(IMethods.class).objectReturningMethodNoArgs()).
thenThrow
(NullPointerException.class, IllegalArgumentException.class);
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/
SysuiBaseFragmentTest.java
60
when(inst.getContext()).
thenThrow
(new RuntimeException(
62
when(inst.getTargetContext()).
thenThrow
(new RuntimeException(
/frameworks/base/services/robotests/src/com/android/server/backup/testing/
TransportTestUtils.java
124
.
thenThrow
(TransportNotRegisteredException.class);
126
.
thenThrow
(TransportNotRegisteredException.class);
128
.
thenThrow
(TransportNotRegisteredException.class);
130
.
thenThrow
(TransportNotRegisteredException.class);
155
.
thenThrow
(TransportNotAvailableException.class);
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
ImageReaderTest.java
133
when(mReader.acquireNextImage()).
thenThrow
(new IllegalStateException());
149
thenThrow
(new OutOfMemoryError());
170
thenThrow
(new RuntimeException());
/external/mockito/src/test/java/org/mockitousage/stacktrace/
StackTraceFilteringTest.java
125
when(mock.oneArg(true)).
thenThrow
(new Exception());
134
when(mock.simpleMethod()).
thenThrow
(new RuntimeException());
/external/mockito/src/test/java/org/mockitousage/matchers/
VerificationAndStubbingUsingMatchersTest.java
34
when(three.simpleMethod(startsWith("test"))).
thenThrow
(new RuntimeException());
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/
MdmPackageInfoTest.java
81
.
thenThrow
(new NameNotFoundException());
/packages/apps/Settings/tests/robotests/src/com/android/settings/datausage/
AppPrefLoaderTest.java
62
.
thenThrow
(new NameNotFoundException());
/packages/providers/BlockedNumberProvider/tests/src/com/android/providers/blockednumber/
BlockedNumberContractTest.java
70
.
thenThrow
(new NullPointerException());
/external/mockito/src/main/java/org/mockito/
BDDMockito.java
115
* See original {@link OngoingStubbing#
thenThrow
(Throwable...)}
121
* See original {@link OngoingStubbing#
thenThrow
(Class)}
127
* See original {@link OngoingStubbing#
thenThrow
(Class, Class[])}
172
return new BDDOngoingStubbingImpl<T>(mockitoOngoingStubbing.
thenThrow
(throwables));
176
return new BDDOngoingStubbingImpl<T>(mockitoOngoingStubbing.
thenThrow
(throwableType));
180
return new BDDOngoingStubbingImpl<T>(mockitoOngoingStubbing.
thenThrow
(throwableType, throwableTypes));
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/p2p/
SupplicantP2pIfaceHalTest.java
390
when(mISupplicantP2pIfaceMock.find(anyInt())).
thenThrow
(mRemoteException);
427
when(mISupplicantP2pIfaceMock.stopFind()).
thenThrow
(mRemoteException);
464
when(mISupplicantP2pIfaceMock.flush()).
thenThrow
(mRemoteException);
501
when(mISupplicantP2pIfaceMock.flushServices()).
thenThrow
(mRemoteException);
541
.
thenThrow
(mRemoteException);
582
.
thenThrow
(mRemoteException);
626
.
thenThrow
(mRemoteException);
810
.
thenThrow
(mRemoteException);
[
all
...]
/external/mockito/src/test/java/org/mockito/internal/configuration/plugins/
PluginLoaderTest.java
71
when(initializer.loadImpl(Foo.class)).
thenThrow
(cause);
/external/mockito/src/test/java/org/mockitousage/basicapi/
ResetTest.java
75
when(mock.simpleMethod("one")).
thenThrow
(new RuntimeException());
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/avrcp/
AvrcpTest.java
72
when(mockContext.startService(isA(Intent.class))).
thenThrow
(new SecurityException("test"));
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/
InstallExistingPackageTaskTest.java
86
.
thenThrow
(new PackageManager.NameNotFoundException());
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/
FetchPackageStorageAsyncLoaderTest.java
78
thenThrow
(new IOException("intentional failure"));
/packages/apps/Settings/tests/robotests/src/com/android/settings/backup/
BackupSettingsHelperTest.java
117
when(mBackupManager.getDataManagementIntent(anyString())).
thenThrow
(new RemoteException());
155
when(mBackupManager.isBackupServiceActive(anyInt())).
thenThrow
(new RemoteException());
215
when(mBackupManager.getDestinationString(anyString())).
thenThrow
(new RemoteException());
235
when(mBackupManager.getDataManagementLabel(anyString())).
thenThrow
(new RemoteException());
Completed in 1299 milliseconds
1
2
3