Home
last modified time | relevance | path

Searched refs:mContextMock (Results 1 – 18 of 18) sorted by relevance

/packages/modules/Wifi/framework/tests/src/android/net/wifi/p2p/
DWifiP2pManagerTest.java69 public Context mContextMock; field in WifiP2pManagerTest
86 when(mContextMock.getOpPackageName()).thenReturn(PACKAGE_NAME); in setUp()
89 when(mContextMock.getAttributionSource()).thenReturn(attributionSource); in setUp()
98 mDut.initialize(mContextMock, mTestLooper.getLooper(), null); in testInitialize()
101 assertEquals(mContextMock.getAttributionSource(), in testInitialize()
120 when(mContextMock.getDisplay()).thenReturn(display); in testInitializeWithDisplayContext()
121 mDut.initialize(mContextMock, mTestLooper.getLooper(), null); in testInitializeWithDisplayContext()
133 doThrow(UnsupportedOperationException.class).when(mContextMock).getDisplay(); in testInitializeWithInvalidDisplayContext()
134 mDut.initialize(mContextMock, mTestLooper.getLooper(), null); in testInitializeWithInvalidDisplayContext()
146 try (WifiP2pManager.Channel channel = new WifiP2pManager.Channel(mContextMock, in testChannelFinalize()
[all …]
/packages/services/Car/tests/carservice_test/src/com/android/car/garagemode/
DGarageModeControllerTest.java83 @Mock private Context mContextMock; field in GarageModeControllerTest
118 mController = new GarageModeController(mContextMock, mLooper, mHandler, in setUp()
156 mController = new GarageModeController(mContextMock, looper); in testOnShutdownCancelled_shouldCancelGarageMode()
179 when(mContextMock.getMainExecutor()).thenReturn(mockExecutor); in testInitAndRelease()
181 var controller = new GarageModeController(mContextMock, mLooper, mHandler, garageMode); in testInitAndRelease()
193 when(mContextMock.getResources()).thenReturn(resourcesMock); in testConstructor()
195 var controller = new GarageModeController(mContextMock, mLooper); in testConstructor()
203 var controller = new GarageModeController(mContextMock, mLooper, mHandler, garageMode); in testOnStateChanged()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/hal/
DWifiHalTest.java43 @Mock Context mContextMock; field in WifiHalTest
50 super(mContextMock, mSsidTranslatorMock); in WifiHalAidlSpy()
62 super(mContextMock, mSsidTranslatorMock); in WifiHalHidlSpy()
74 super(mContextMock, mSsidTranslatorMock); in WifiHalNullSpy()
DWifiStaIfaceTest.java44 @Mock Context mContextMock; field in WifiStaIfaceTest
51 super(staIface, mContextMock, mSsidTranslatorMock); in WifiStaIfaceSpy()
55 super(staIface, mContextMock, mSsidTranslatorMock); in WifiStaIfaceSpy()
75 super(mIWifiStaIfaceAidlMock, mContextMock, mSsidTranslatorMock); in NullWifiStaIfaceSpy()
DWifiChipTest.java48 @Mock Context mContextMock; field in WifiChipTest
55 super(chip, mContextMock, mSsidTranslatorMock); in WifiChipSpy()
59 super(chip, mContextMock, mSsidTranslatorMock); in WifiChipSpy()
79 super(mIWifiChipAidlMock, mContextMock, mSsidTranslatorMock); in NullWifiChipSpy()
DWifiHalAidlImplTest.java51 @Mock private Context mContextMock; field in WifiHalAidlImplTest
60 super(mContextMock, mSsidTranslatorMock); in WifiHalAidlImplSpy()
DWifiHalHidlImplTest.java61 @Mock Context mContextMock; field in WifiHalHidlImplTest
78 super(mContextMock, mSsidTranslatorMock); in WifiHalSpy()
DWifiChipHidlImplTest.java83 @Mock private Context mContextMock; field in WifiChipHidlImplTest
91 super(mIWifiChipMock, mContextMock, mSsidTranslatorMock); in WifiChipHidlImplSpy()
130 when(mContextMock.getResources()).thenReturn(mResourcesMock); in setUp()
DWifiStaIfaceAidlImplTest.java79 @Mock private Context mContextMock; field in WifiStaIfaceAidlImplTest
86 when(mContextMock.getResources()).thenReturn(mResourcesMock); in setUp()
87 mDut = new WifiStaIfaceAidlImpl(mIWifiStaIfaceMock, mContextMock, mSsidTranslatorMock); in setUp()
140 mDut = new WifiStaIfaceAidlImpl(mIWifiStaIfaceMock, mContextMock, mSsidTranslatorMock); in testTwoRadioStatsAggregation()
DWifiChipAidlImplTest.java76 @Mock private Context mContextMock; field in WifiChipAidlImplTest
82 mDut = new WifiChipAidlImpl(mIWifiChipMock, mContextMock, mSsidTranslatorMock); in setUp()
DWifiStaIfaceHidlImplTest.java88 @Mock private Context mContextMock; field in WifiStaIfaceHidlImplTest
96 super(mIWifiStaIfaceMock, mContextMock, mSsidTranslatorMock); in WifiStaIfaceHidlImplSpy()
124 when(mContextMock.getResources()).thenReturn(mResourcesMock); in setUp()
/packages/services/Car/tests/CarLibUnitTest/src/android/car/media/
DCarMediaManagerUnitTest.java62 private Context mContextMock; field in CarMediaManagerUnitTest
78 when(mCarMock.getContext()).thenReturn(mContextMock); in setUp()
79 when(mContextMock.getUser()).thenReturn(UserHandle.of(TEST_USER_ID)); in setUp()
DCarAudioManagerUnitTest.java124 private Context mContextMock; field in CarAudioManagerUnitTest
166 when(mCar.getContext()).thenReturn(mContextMock); in setUp()
168 when(mContextMock.getSystemService(AudioManager.class)).thenReturn(mAudioManagerMock); in setUp()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/aware/
DWifiAwareServiceImplTest.java112 private Context mContextMock; field in WifiAwareServiceImplTest
173 when(mContextMock.getApplicationContext()).thenReturn(mContextMock); in setup()
174 when(mContextMock.getPackageManager()).thenReturn(mPackageManagerMock); in setup()
192 mDut = new WifiAwareServiceImplSpy(mContextMock); in setup()
196 when(mContextMock.getResources()).thenReturn(resources); in setup()
206 verify(mAwareStateManagerMock).start(eq(mContextMock), any(), eq(mAwareMetricsMock), in setup()
296 when(mContextMock.checkCallingOrSelfPermission(anyString())) in testConnectWithManageNetworkSelectionPermission()
809 doThrow(new SecurityException()).when(mContextMock).enforceCallingOrSelfPermission( in testRequestMacAddressWithoutPermission()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/adselection/
DEventReporterFactoryTest.java58 @Mock private Context mContextMock; field in EventReporterFactoryTest
143 mContextMock, in getEventReporter()
DReportAndRegisterEventImplTest.java173 @Mock private Context mContextMock; field in ReportAndRegisterEventImplTest
1208 mContextMock, in getReportAndRegisterEventImpl()
DReportAndRegisterEventFallbackImplTest.java179 @Mock private Context mContextMock; field in ReportAndRegisterEventFallbackImplTest
1555 mContextMock, in getReportAndRegisterEventFallbackImpl()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/stats/
DAdSelectionExecutionLoggerTest.java235 @Mock private Context mContextMock; field in AdSelectionExecutionLoggerTest
275 when(mContextMock.getDatabasePath(DATABASE_NAME)).thenReturn(mMockDBAdSelectionFile); in testAdSelectionExecutionLogger_SuccessAdSelection()
1054 sCallerMetadata, mMockClock, mContextMock, mAdServicesLoggerMock, mFlags); in testAdSelectionExecutionLogger_missingStartRunAdScoring()
1445 when(mContextMock.getDatabasePath(DATABASE_NAME)).thenReturn(mMockDBAdSelectionFile); in testAdSelectionExecutionLogger_redundantEndOfPersistAdSelection()
1580 sCallerMetadata, mMockClock, mContextMock, mAdServicesLoggerMock, mFlags); in getAdSelectionExecutionLogger()