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
53
) sorted by null
1
2
3
/external/mockito/src/main/java/org/mockito/internal/stubbing/
BaseStubbing.java
32
private OngoingStubbing<T>
thenThrow
(Throwable throwable) {
36
public OngoingStubbing<T>
thenThrow
(Throwable... throwables) {
38
return
thenThrow
((Throwable) null);
43
stubbing =
thenThrow
(t);
45
stubbing = stubbing.
thenThrow
(t);
51
public OngoingStubbing<T>
thenThrow
(Class<? extends Throwable> throwableType) {
56
public OngoingStubbing<T>
thenThrow
(Class<? extends Throwable> toBeThrown, Class<? extends Throwable>... nextToBeThrown) {
58
thenThrow
((Throwable) null);
60
OngoingStubbing<T> stubbing =
thenThrow
(toBeThrown);
62
stubbing = stubbing.
thenThrow
(t)
[
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
40
when(mock.add("throw")).
thenThrow
(expected);
77
when(mock.get(1)).
thenThrow
(new ExceptionOne());
80
when(mock.get(1)).
thenThrow
(new ExceptionTwo());
91
when(reader.read()).
thenThrow
(ioException);
105
when(mock.add("quake")).
thenThrow
(error);
117
when(mock.add(null)).
thenThrow
((Exception) null);
123
when(mock.add(null)).
thenThrow
(NaughtyException.class);
137
when(mock.add("monkey island")).
thenThrow
(new Exception());
142
when(mock.add("monkey island")).
thenThrow
((Throwable) null);
147
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
26
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
36
when(mock(IMethods.class).objectReturningMethodNoArgs()).
thenThrow
(new NullPointerException());
37
when(mock(IMethods.class).objectReturningMethodNoArgs()).
thenThrow
(new NullPointerException(), new IllegalArgumentException());
38
when(mock(IMethods.class).objectReturningMethodNoArgs()).
thenThrow
(NullPointerException.class);
43
when(mock(IMethods.class).objectReturningMethodNoArgs()).then(ignore()).
thenThrow
(new NullPointerException());
44
when(mock(IMethods.class).objectReturningMethodNoArgs()).then(ignore()).
thenThrow
(new NullPointerException(), new IllegalArgumentException());
45
when(mock(IMethods.class).objectReturningMethodNoArgs()).then(ignore()).
thenThrow
(NullPointerException.class);
80
when(mock(IMethods.class).objectReturningMethodNoArgs()).
thenThrow
(NullPointerException.class, IllegalArgumentException.class);
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/
SysuiBaseFragmentTest.java
56
when(inst.getContext()).
thenThrow
(new RuntimeException(
58
when(inst.getTargetContext()).
thenThrow
(new RuntimeException(
SysuiTestCase.java
59
when(inst.getContext()).
thenThrow
(new RuntimeException(
61
when(inst.getTargetContext()).
thenThrow
(new RuntimeException(
/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/app/src/com/android/settings/applications/
PackageUtilTest.java
77
.
thenThrow
(new PackageManager.NameNotFoundException());
/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
309
when(mISupplicantP2pIfaceMock.find(anyInt())).
thenThrow
(mRemoteException);
346
when(mISupplicantP2pIfaceMock.stopFind()).
thenThrow
(mRemoteException);
383
when(mISupplicantP2pIfaceMock.flush()).
thenThrow
(mRemoteException);
420
when(mISupplicantP2pIfaceMock.flushServices()).
thenThrow
(mRemoteException);
460
.
thenThrow
(mRemoteException);
501
.
thenThrow
(mRemoteException);
545
.
thenThrow
(mRemoteException);
729
.
thenThrow
(mRemoteException);
801
.
thenThrow
(mRemoteException);
[
all
...]
/external/mockito/src/test/java/org/mockitousage/basicapi/
ResetTest.java
75
when(mock.simpleMethod("one")).
thenThrow
(new RuntimeException());
/packages/apps/Bluetooth/tests/src/com/android/bluetooth/avrcp/
AvrcpTest.java
67
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());
SetDevicePolicyTaskTest.java
104
.
thenThrow
(new IllegalArgumentException());
150
TEST_USER_ID)).
thenThrow
(new IllegalStateException());
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/
FetchPackageStorageAsyncLoaderTest.java
79
thenThrow
(new IOException("intentional failure"));
/packages/apps/Settings/tests/robotests/src/com/android/settings/backup/
BackupSettingsHelperTest.java
118
when(mBackupManager.getDataManagementIntent(anyString())).
thenThrow
(new RemoteException());
156
when(mBackupManager.isBackupServiceActive(anyInt())).
thenThrow
(new RemoteException());
216
when(mBackupManager.getDestinationString(anyString())).
thenThrow
(new RemoteException());
236
when(mBackupManager.getDataManagementLabel(anyString())).
thenThrow
(new RemoteException());
/packages/apps/Settings/tests/robotests/src/com/android/settings/datausage/
AppPrefLoaderTest.java
72
.
thenThrow
(new NameNotFoundException());
Completed in 657 milliseconds
1
2
3