Home
last modified time | relevance | path

Searched refs:mockContext (Results 1 – 10 of 10) sorted by relevance

/frameworks/base/core/tests/coretests/src/android/os/
DVibrationEffectTest.java46 Context context = mockContext(r); in getRingtones_noPrebakedRingtones()
54 Context context = mockContext(r); in getRingtones_noPrebakedRingtoneForUri()
62 Context context = mockContext(r); in getRingtones_getPrebakedRingtone()
85 private Context mockContext(Resources r) { in mockContext() method in VibrationEffectTest
/frameworks/base/core/tests/coretests/src/android/app/timezone/
DRulesUpdaterContractTest.java59 Context mockContext = mock(Context.class); in sendBroadcast() local
61 RulesUpdaterContract.sendBroadcast(mockContext, packageName, tokenBytes); in sendBroadcast()
63 verify(mockContext).sendBroadcastAsUser( in sendBroadcast()
/frameworks/base/wifi/tests/src/android/net/wifi/
DWifiNetworkScoreCacheTest.java66 @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/services/tests/servicestests/src/com/android/server/search/
DSearchablesTest.java102 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/
DRttServiceImplTest.java125 public Context mockContext; field in RttServiceImplTest
182 mDut = new RttServiceImplSpy(mockContext); in setUp()
186 when(mockContext.checkCallingOrSelfPermission( in setUp()
191 doNothing().when(mFrameworkFacade).registerContentObserver(eq(mockContext), any(), in setUp()
194 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()
214 mMockPowerManager = new PowerManager(mockContext, mock(IPowerManager.class), in setUp()
217 when(mockContext.getSystemServiceName(PowerManager.class)).thenReturn( in setUp()
[all …]
/frameworks/base/wifi/tests/src/android/net/wifi/rtt/
DWifiRttManagerTest.java56 public Context mockContext; field in WifiRttManagerTest
65 mDut = new WifiRttManager(mockContext, mockRttService); in setUp()
69 when(mockContext.getOpPackageName()).thenReturn(packageName); in setUp()
/frameworks/base/core/tests/coretests/src/android/content/pm/
DCrossProfileAppsTest.java74 public void mockContext() { in mockContext() method in CrossProfileAppsTest
/frameworks/base/wifi/tests/src/android/net/wifi/aware/
DWifiAwareManagerTest.java68 public Context mockContext; field in WifiAwareManagerTest
111 when(mockContext.getOpPackageName()).thenReturn("XXX"); in setUp()
112 when(mockContext.getPackageManager()).thenReturn(mockPackageManager); in setUp()
114 mDut = new WifiAwareManager(mockContext, mockAwareService); in setUp()
/frameworks/base/services/tests/servicestests/src/com/android/server/accounts/
DAccountManagerServiceTest.java163 MyMockContext mockContext = new MyMockContext(realTestContext, mMockContext); in setUp() local
164 setContext(mockContext); in setUp()
165 mTestInjector = new TestInjector(realTestContext, mockContext, mMockNotificationManager); in setUp()
3184 MyMockContext(Context testContext, Context mockContext) { in MyMockContext() argument
3186 this.mMockContext = mockContext; in MyMockContext()
3285 Context mockContext, in TestInjector() argument
3287 super(mockContext); in TestInjector()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DWifiConnectivityManagerTest.java86 mContext = mockContext(); in setUp()
173 Context mockContext() { in mockContext() method in WifiConnectivityManagerTest