/frameworks/base/tests/net/java/android/net/ |
D | NetworkTemplateTest.kt | 51 private val mockContext = mock(Context::class.java) constant in android.net.NetworkTemplateTest 99 mockContext, stateMobile, false, TelephonyManager.NETWORK_TYPE_UMTS) in testRatTypeGroupMatches() 101 mockContext, stateMobile, false, TelephonyManager.NETWORK_TYPE_HSDPA) in testRatTypeGroupMatches() 103 mockContext, stateMobile, false, TelephonyManager.NETWORK_TYPE_LTE) in testRatTypeGroupMatches() 105 mockContext, stateMobile, false, SUBTYPE_COMBINED) in testRatTypeGroupMatches() 106 val identImsi2 = buildNetworkIdentity(mockContext, buildMobileNetworkState(TEST_IMSI2), in testRatTypeGroupMatches() 109 mockContext, buildWifiNetworkState(TEST_SSID1), true, 0) in testRatTypeGroupMatches()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/ |
D | BluetoothEventManagerTest.java | 74 Context mockContext = mock(Context.class); in ifUserHandleIsNull_registerReceiverIsCalled() local 76 new BluetoothEventManager(mLocalAdapter, mCachedDeviceManager, mockContext, in ifUserHandleIsNull_registerReceiverIsCalled() 79 verify(mockContext).registerReceiver(any(BroadcastReceiver.class), any(IntentFilter.class), in ifUserHandleIsNull_registerReceiverIsCalled() 85 Context mockContext = mock(Context.class); in ifUserHandleSpecified_registerReceiverAsUserIsCalled() local 87 new BluetoothEventManager(mLocalAdapter, mCachedDeviceManager, mockContext, in ifUserHandleSpecified_registerReceiverAsUserIsCalled() 90 verify(mockContext).registerReceiverAsUser(any(BroadcastReceiver.class), eq(UserHandle.ALL), in ifUserHandleSpecified_registerReceiverAsUserIsCalled()
|
/frameworks/base/tests/net/java/android/net/util/ |
D | KeepaliveUtilsTest.kt | 63 val mockContext = getMockedContextWithStringArrayRes( in testGetSupportedKeepalives() constant 65 KeepaliveUtils.getSupportedKeepalives(mockContext) in testGetSupportedKeepalives() 91 val mockContext = getMockedContextWithStringArrayRes( in testGetSupportedKeepalives() constant 93 val actual = KeepaliveUtils.getSupportedKeepalives(mockContext) in testGetSupportedKeepalives()
|
/frameworks/base/core/tests/coretests/src/android/app/timezone/ |
D | RulesUpdaterContractTest.java | 60 Context mockContext = mock(Context.class); in sendBroadcast() local 62 RulesUpdaterContract.sendBroadcast(mockContext, packageName, tokenBytes); in sendBroadcast() 64 verify(mockContext).sendBroadcastAsUser( in sendBroadcast()
|
/frameworks/base/wifi/tests/src/android/net/wifi/ |
D | WifiNetworkScoreCacheTest.java | 66 @Mock private Context mockContext; // isn't used, can be null field in WifiNetworkScoreCacheTest 102 when(mockContext.getApplicationContext()).thenReturn(mockApplicationContext); in setUp() 105 mScoreCache = new WifiNetworkScoreCache(mockContext); in setUp() 193 mScoreCache = new WifiNetworkScoreCache(mockContext, mCacheListener); in updateScoresShouldInvokeCacheListener_networkCacheUpdated() 208 mScoreCache = new WifiNetworkScoreCache(mockContext, mCacheListener, 2 /* maxCacheSize */); in leastRecentlyUsedScore_shouldBeEvictedFromCache()
|
/frameworks/base/core/tests/coretests/src/android/os/ |
D | VibrationEffectTest.java | 61 Context context = mockContext(r); in getRingtones_noPrebakedRingtones() 69 Context context = mockContext(r); in getRingtones_noPrebakedRingtoneForUri() 77 Context context = mockContext(r); in getRingtones_getPrebakedRingtone() 175 private Context mockContext(Resources r) {
|
/frameworks/base/services/tests/servicestests/src/com/android/server/search/ |
D | SearchablesTest.java | 102 MyMockContext mockContext = new MyMockContext(mContext, mockPM); in testSearchablesListReal() local 106 Searchables searchables = new Searchables(mockContext, 0); in testSearchablesListReal() 122 MyMockContext mockContext = new MyMockContext(mContext, mockPM); in testSearchablesListEmpty() local 125 Searchables searchables = new Searchables(mockContext, 0); in testSearchablesListEmpty()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/rtt/ |
D | RttServiceImplTest.java | 129 public Context mockContext; field in RttServiceImplTest 183 mDut = new RttServiceImplSpy(mockContext); in setUp() 187 when(mockContext.checkCallingOrSelfPermission( in setUp() 192 doNothing().when(mFrameworkFacade).registerContentObserver(eq(mockContext), any(), in setUp() 195 eq(mockContext), in setUp() 199 when(mockContext.getSystemService(Context.ALARM_SERVICE)) in setUp() 201 mInOrder = inOrder(mAlarmManager.getAlarmManager(), mockContext); in setUp() 203 when(mockContext.getSystemService(Context.ACTIVITY_SERVICE)).thenReturn( in setUp() 215 mMockPowerManager = new PowerManager(mockContext, mock(IPowerManager.class), in setUp() 218 when(mockContext.getSystemServiceName(PowerManager.class)).thenReturn( in setUp() [all …]
|
/frameworks/base/wifi/tests/src/android/net/wifi/rtt/ |
D | WifiRttManagerTest.java | 59 public Context mockContext; field in WifiRttManagerTest 68 mDut = new WifiRttManager(mockContext, mockRttService); in setUp() 72 when(mockContext.getOpPackageName()).thenReturn(packageName); in setUp()
|
/frameworks/base/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/ |
D | TetheringNotificationUpdaterTest.kt | 81 @Mock private lateinit var mockContext: Context variable in com.android.networkstack.tethering.TetheringNotificationUpdaterTest 99 if (user == UserHandle.ALL) mockContext else this in createContextAsUser() 136 doReturn(notificationManager).`when`(mockContext) in setUp()
|
/frameworks/base/core/tests/coretests/src/android/content/pm/ |
D | CrossProfileAppsTest.java | 74 public void mockContext() { in mockContext() method in CrossProfileAppsTest
|
/frameworks/base/wifi/tests/src/android/net/wifi/aware/ |
D | WifiAwareManagerTest.java | 75 public Context mockContext; field in WifiAwareManagerTest 118 when(mockContext.getOpPackageName()).thenReturn("XXX"); in setUp() 119 when(mockContext.getPackageManager()).thenReturn(mockPackageManager); in setUp() 121 mDut = new WifiAwareManager(mockContext, mockAwareService); in setUp()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/accounts/ |
D | AccountManagerServiceTest.java | 165 MyMockContext mockContext = new MyMockContext(realTestContext, mMockContext); in setUp() local 166 setContext(mockContext); in setUp() 167 mTestInjector = new TestInjector(realTestContext, mockContext, mMockNotificationManager); in setUp() 3207 MyMockContext(Context testContext, Context mockContext) { in MyMockContext() argument 3209 this.mMockContext = mockContext; in MyMockContext() 3308 Context mockContext, in TestInjector() argument 3310 super(mockContext); in TestInjector()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | WifiConnectivityManagerTest.java | 89 mContext = mockContext(); in setUp() 184 Context mockContext() { in mockContext() method in WifiConnectivityManagerTest
|