OpenGrok
Home
Sort by relevance
Sort by last modified time
Full Search
Definition
Symbol
File Path
History
|
|
Help
Searched
defs:mockContext
(Results
1 - 10
of
10
) sorted by null
/packages/apps/Bluetooth/tests/src/com/android/bluetooth/tests/
DevicePolicyUtilsTest.java
63
Context
mockContext
= getMockContext(false, true);
64
Uri uri = DevicePolicyUtils.getEnterprisePhoneUri(
mockContext
);
70
Context
mockContext
= getMockContext(false, false);
71
Uri uri = DevicePolicyUtils.getEnterprisePhoneUri(
mockContext
);
77
Context
mockContext
= getMockContext(true, true);
78
Uri uri = DevicePolicyUtils.getEnterprisePhoneUri(
mockContext
);
84
Context
mockContext
= getMockContext(true, false);
85
Uri uri = DevicePolicyUtils.getEnterprisePhoneUri(
mockContext
);
108
Context
mockContext
= mock(Context.class);
109
doReturn(mockDpm).when(
mockContext
).getSystemService(Context.DEVICE_POLICY_SERVICE)
[
all
...]
/packages/apps/Bluetooth/tests/src/com/android/bluetooth/tests/pbap/
BluetoothPbapVcardManagerTest.java
146
BluetoothMockContext
mockContext
= new BluetoothMockContext(contentResolver, getContext());
147
return new BluetoothPbapVcardManager(
mockContext
);
/packages/apps/ManagedProvisioning/tests/src/com/android/managedprovisioning/common/
MdmPackageInfoTest.java
39
@Mock private Context
mockContext
;
51
when(
mockContext
.getPackageManager()).thenReturn(mockPackageManager);
70
MdmPackageInfo mdmInfo = MdmPackageInfo.createFromPackageName(
mockContext
,
83
assertNull(MdmPackageInfo.createFromPackageName(
mockContext
, TEST_PACKAGE_NAME));
UtilsTest.java
73
@Mock private Context
mockContext
;
88
when(
mockContext
.getSystemService(Context.ACCOUNT_SERVICE)).thenReturn(mockAccountManager);
89
when(
mockContext
.getPackageManager()).thenReturn(mockPackageManager);
90
when(
mockContext
.getSystemService(Context.CONNECTIVITY_SERVICE))
130
assertTrue(mUtils.packageRequiresUpdate(TEST_PACKAGE_NAME_1, 0,
mockContext
));
142
assertFalse(mUtils.packageRequiresUpdate(TEST_PACKAGE_NAME_1, 0,
mockContext
));
143
assertFalse(mUtils.packageRequiresUpdate(TEST_PACKAGE_NAME_1, 1,
mockContext
));
144
assertTrue(mUtils.packageRequiresUpdate(TEST_PACKAGE_NAME_1, 2,
mockContext
));
162
assertTrue(mUtils.maybeCopyAccount(
mockContext
, testAccount, primaryUser, managedProfile));
183
assertFalse(mUtils.maybeCopyAccount(
mockContext
, testAccount, primaryUser, managedProfile))
[
all
...]
/packages/apps/ManagedProvisioning/tests/src/com/android/managedprovisioning/task/
DisallowAddUserTaskTest.java
45
@Mock private Context
mockContext
;
/packages/apps/Dialer/tests/src/com/android/dialer/filterednumber/
FilteredNumbersUtilTest.java
115
Context
mockContext
= mock(Context.class);
117
FilteredNumbersUtil.maybeNotifyCallBlockingDisabled(
mockContext
);
118
verifyZeroInteractions(
mockContext
);
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/enterprise/
EnterprisePolicyGuardTest.java
28
import android.test.mock.
MockContext
;
272
Context
mockContext
= new TestMockContext(getContext(), mockDpm, mockUm);
274
return
mockContext
;
277
private static final class TestMockContext extends
MockContext
{
/frameworks/base/services/tests/servicestests/src/com/android/server/search/
SearchablesTest.java
36
import android.test.mock.
MockContext
;
102
MyMockContext
mockContext
= new MyMockContext(mContext, mockPM);
106
Searchables searchables = new Searchables(
mockContext
, 0);
122
MyMockContext
mockContext
= new MyMockContext(mContext, mockPM);
125
Searchables searchables = new Searchables(
mockContext
, 0);
228
private class MyMockContext extends
MockContext
{
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
WifiConnectivityManagerTest.java
71
mContext =
mockContext
();
124
Context
mockContext
() {
[
all
...]
/frameworks/base/services/tests/servicestests/src/com/android/server/accounts/
AccountManagerServiceTest.java
44
import android.test.mock.
MockContext
;
69
Context
mockContext
= new MyMockContext(realTestContext);
70
setContext(
mockContext
);
71
mAms = createAccountManagerService(
mockContext
, realTestContext);
287
private AccountManagerService createAccountManagerService(Context
mockContext
,
290
return new MyAccountManagerService(
mockContext
,
351
static public class MyMockContext extends
MockContext
{
Completed in 746 milliseconds