Home
last modified time | relevance | path

Searched refs:thenAnswer (Results 1 – 25 of 129) sorted by relevance

123456

/packages/services/Car/libs/car-test-lib/src/android/car/test/mocks/
DMockSettings.java65 when(Settings.Global.putInt(any(), any(), anyInt())).thenAnswer(insertObjectAnswer); in setExpectations()
67 when(Settings.Global.getInt(any(), any(), anyInt())).thenAnswer(getIntAnswer); in setExpectations()
69 when(Settings.System.putInt(any(), any(), anyInt())).thenAnswer(insertObjectAnswer); in setExpectations()
71 when(Settings.System.getInt(any(), any(), anyInt())).thenAnswer(getIntAnswer); in setExpectations()
74 .thenAnswer(insertObjectAnswer); in setExpectations()
77 .thenAnswer(getIntAnswer); in setExpectations()
79 when(Settings.Secure.getInt(any(), any(), anyInt())).thenAnswer(getIntAnswer); in setExpectations()
82 .thenAnswer(insertObjectAnswer); in setExpectations()
85 .thenAnswer(insertObjectAnswer); in setExpectations()
87 when(Settings.Global.getString(any(), any())).thenAnswer(getStringAnswer); in setExpectations()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/
DSatelliteRepositoryTest.kt79 .thenAnswer { invocation -> in <lambda>()
95 ).thenAnswer { invocation -> in <lambda>()
109 ).thenAnswer { invocation -> in <lambda>()
123 ).thenAnswer { in <lambda>()
148 .thenAnswer { invocation -> in <lambda>()
168 .thenAnswer { invocation -> in <lambda>()
196 ).thenAnswer { invocation -> in <lambda>()
214 ).thenAnswer { invocation -> in <lambda>()
236 ).thenAnswer { in <lambda>()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/
DOccupantZoneHelper.java87 when(service.getAllOccupantZones()).thenAnswer(inv -> mZones); in setUpOccupantZones()
91 when(service.getOccupantZone(anyInt(), anyInt())).thenAnswer( in setUpOccupantZones()
110 when(service.getDisplayForOccupant(anyInt(), anyInt())).thenAnswer( in setUpOccupantZones()
125 when(service.assignVisibleUserToOccupantZone(anyInt(), any())).thenAnswer( in setUpOccupantZones()
149 when(service.unassignOccupantZone(anyInt())).thenAnswer( in setUpOccupantZones()
165 when(service.getOccupantZoneIdForUserId(anyInt())).thenAnswer( in setUpOccupantZones()
178 when(service.getUserForOccupant(anyInt())).thenAnswer( in setUpOccupantZones()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/adselection/
DBuyerInputGeneratorTest.java176 .thenAnswer(i -> i.getArguments()[0]); in testBuyerInputGenerator_returnsBuyerInputs_onlyCAsWithRenderIdReturned_success()
178 .thenAnswer(i -> i.getArguments()[0]); in testBuyerInputGenerator_returnsBuyerInputs_onlyCAsWithRenderIdReturned_success()
227 .thenAnswer(i -> i.getArguments()[0]); in testBuyerInputGenerator_returnsBuyerInputs_onlyCAsWithRenderIdReturned_successPayloadMetricsEnabled()
229 .thenAnswer(i -> i.getArguments()[0]); in testBuyerInputGenerator_returnsBuyerInputs_onlyCAsWithRenderIdReturned_successPayloadMetricsEnabled()
382 .thenAnswer(i -> i.getArguments()[0]); in testBuyerInputGenerator_returnsBuyerInputsWithoutRenderIdForSpecifiedCA()
384 .thenAnswer(i -> i.getArguments()[0]); in testBuyerInputGenerator_returnsBuyerInputsWithoutRenderIdForSpecifiedCA()
462 .thenAnswer(i -> i.getArguments()[0]); in testBuyerInputGenerator_returnsBuyerInputsWithoutRenderIdForSpecifiedCAPayloadMetricsEnabled()
464 .thenAnswer(i -> i.getArguments()[0]); in testBuyerInputGenerator_returnsBuyerInputsWithoutRenderIdForSpecifiedCAPayloadMetricsEnabled()
550 .thenAnswer(i -> i.getArguments()[0]); in testBuyerInputGenerator_returnsBuyerInputsWithRenderIdIfFlagFalse()
552 .thenAnswer(i -> i.getArguments()[0]); in testBuyerInputGenerator_returnsBuyerInputsWithRenderIdIfFlagFalse()
[all …]
DAuctionServerE2ETest.java578 .thenAnswer( in testGetAdSelectionData_withoutEncrypt_validRequest_success()
639 .thenAnswer( in testAuctionServerFlow_withoutEncrypt_validRequest_BothFiltersEnabled()
643 .thenAnswer(invocation -> invocation.getArgument(0)); in testAuctionServerFlow_withoutEncrypt_validRequest_BothFiltersEnabled()
773 .thenAnswer( in testAuctionServerFlow_withoutEncrypt_validRequest_AppInstallDisabled()
777 .thenAnswer(invocation -> invocation.getArgument(0)); in testAuctionServerFlow_withoutEncrypt_validRequest_AppInstallDisabled()
923 .thenAnswer( in testAuctionServerFlow_withoutEncrypt_validRequest_FrequencyCapDisabled()
927 .thenAnswer(invocation -> invocation.getArgument(0)); in testAuctionServerFlow_withoutEncrypt_validRequest_FrequencyCapDisabled()
1089 .thenAnswer( in testGetAdSelectionData_withoutEncrypt_validRequest_successPayloadMetricsEnabled()
1202 .thenAnswer( in testGetAdSelectionData_validRequest_successPayloadMetricsEnabled_withSourceCoordinator()
1290 .thenAnswer( in testGetAdSelectionData_withoutEncrypt_validRequest_successPayloadMetricsDisabled()
[all …]
DAdBidGeneratorImplTest.java453 .thenAnswer( in testRunAdBiddingPerCASuccess_preV3BiddingLogic()
564 .thenAnswer( in testRunAdBiddingPerCASuccess_preV3BiddingLogicWithDataVersionHeaderEnabled()
682 .thenAnswer( in testRunAdBiddingPerCASuccess_preV3BiddingLogicWithDataVersionHeaderDisabled()
798 .thenAnswer( in testRunAdBiddingPerCASuccess_preV3BiddingLogicWithDataVersionHeaderTakesFirstOfMultipleValues()
902 .thenAnswer( in testRunAdBiddingPerCASuccess_preV3BiddingLogicWithAdCost()
1007 .thenAnswer( in testRunAdBiddingPerCASuccess_preV3BiddingLogicAllAdsButWinnerHaveAdCost()
1120 .thenAnswer( in testRunAdBiddingPerCASuccess_preV3BiddingLogicWithAdCostAndDataVersionHeader()
1224 .thenAnswer( in testRunAdBiddingPerCASuccess_preV3BiddingLogicWithCopier()
1344 .thenAnswer( in testRunAdBiddingPerCASuccess_preV3BiddingLogicWithCopierWithAdCounterKeys()
1440 .thenAnswer( in testRunAdBiddingPerCASuccess_v3BiddingLogic()
[all …]
/packages/modules/Permission/PermissionController/tests/mocking/src/com/android/permissioncontroller/tests/mocking/permission/service/
DRuntimePermissionsUpgradeControllerTest.kt90 whenever(application.registerComponentCallbacks(any())).thenAnswer { in <lambda>()
156 whenever(packageManager.getInstalledPackagesAsUser(anyInt(), anyInt())).thenAnswer { in <lambda>()
169 .thenAnswer { in <lambda>()
176 whenever(packageManager.getPackageInfo(anyString(), anyInt())).thenAnswer { in <lambda>()
183 whenever(packageManager.getPermissionFlags(any(), any(), any())).thenAnswer { in <lambda>()
224 whenever(packageManager.getPermissionInfo(any(), anyInt())).thenAnswer { in <lambda>()
233 whenever(packageManager.getPermissionGroupInfo(any(), anyInt())).thenAnswer { in <lambda>()
243 whenever(packageManager.queryPermissionsByGroup(any(), anyInt())).thenAnswer { in <lambda>()
247 whenever(packageManager.hasSystemFeature(any())).thenAnswer { in <lambda>()
/packages/apps/Settings/tests/unit/src/com/android/settings/biometrics/
DParentalConsentHelperTest.java77 when(mRootActivity.getIntent()).thenAnswer(invocation -> mRootActivityIntent); in setup()
78 when(mRootActivityIntent.getBundleExtra(any())).thenAnswer(invocation -> null); in setup()
79 when(mRootActivityIntent.getStringExtra(any())).thenAnswer(invocation -> null); in setup()
81 .thenAnswer(invocation -> invocation.getArguments()[1]); in setup()
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/pbap/
DBluetoothPbapVcardManagerNestedClassesTest.java186 .thenAnswer( in ContactCursorFilter_filterByOffset()
195 .thenAnswer(invocation -> contactIds[currentPos.get()]); in ContactCursorFilter_filterByOffset()
215 .thenAnswer( in ContactCursorFilter_filterByRange()
224 .thenAnswer(invocation -> contactIds[currentPos.get()]); in ContactCursorFilter_filterByRange()
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/eap/crypto/
DTlsSessionTest.java201 .thenAnswer( in setupWrap()
225 .thenAnswer( in setupChainedWrap()
243 .thenAnswer( in setupUnwrap()
265 .thenAnswer( in setupChainedWrap_exception()
/packages/apps/Launcher3/tests/multivalentTests/src/com/android/launcher3/allapps/
DAlphabeticalAppsListTest.java99 .thenAnswer(answer(this::addPrivateSpaceHeader)); in privateProfileEnabled_allPrivateProfileViewsArePresent()
126 .thenAnswer(answer(this::addPrivateSpaceHeader)); in privateProfileEnabled_privateProfileAppsShownWithSeparator()
128 .thenAnswer(answer(this::addSystemAppsDivider)); in privateProfileEnabled_privateProfileAppsShownWithSeparator()
163 .thenAnswer(answer(this::addPrivateSpaceHeader)); in privateProfileDisabled_onlyPrivateProfileHeaderViewIsPresent()
184 .thenAnswer(answer(this::addPrivateSpaceHeader)); in privateProfileTransitioning_onlyPrivateProfileHeaderViewIsPresent()
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/async/
DBufferedFileTest.java250 when(mockAsyncFile.read(any(), anyInt(), anyInt())).thenAnswer(dataAnswer); in read()
278 when(mockAsyncFile.read(any(), anyInt(), anyInt())).thenAnswer(dataAnswer); in enableReadEvents()
305 when(mockAsyncFile.read(any(), anyInt(), anyInt())).thenAnswer(dataAnswer); in enableReadEvents()
324 when(mockAsyncFile.read(any(), anyInt(), anyInt())).thenAnswer(dataAnswer); in shutdownReading()
344 when(mockAsyncFile.read(any(), anyInt(), anyInt())).thenAnswer(dataAnswer); in shutdownReading_inCallback()
/packages/services/Car/tests/carservice_unit_test/src/android/car/test/mocks/
DSyncAnswerTest.java53 when(mSlowServiceInitializer.initialize()).thenAnswer(syncException); in testForException()
65 when(mSlowServiceInitializer.initialize()).thenAnswer(syncInitialized); in testForReturn()
/packages/providers/BlockedNumberProvider/tests/src/com/android/providers/blockednumber/
DBlockedNumberBackupAgentTest.java68 when(backupDataInput.readEntityData(any(), anyInt(), anyInt())).thenAnswer( in testRestoreFromHigherVersion()
83 when(backupDataInput.readNextHeader()).thenAnswer( in testRestoreFromHigherVersion()
/packages/apps/Launcher3/tests/multivalentTests/src/com/android/launcher3/
DAbstractFloatingViewHelperTest.kt47 whenever(folderView.isOfType(any())).thenAnswer { in setup()
50 whenever(taskMenuView.isOfType(any())).thenAnswer { in setup()
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/wear/
DStreamingPacketFileTest.java170 when(mockAsyncFile.read(any(), anyInt(), anyInt())).thenAnswer(dataAnswer); in onInboundPacket()
186 when(mockAsyncFile.read(any(), anyInt(), anyInt())).thenAnswer(dataAnswer); in onInboundPacket()
219 when(mockAsyncFile.read(any(), anyInt(), anyInt())).thenAnswer(dataAnswer); in onReadReady_preambleData()
258 when(mockAsyncFile.read(any(), anyInt(), anyInt())).thenAnswer(dataAnswer); in shutdownReading()
/packages/apps/Messaging/tests/src/com/android/messaging/
DFakeFactory.java90 .thenAnswer(new Answer<String>() { in registerWithFakeContext()
98 Mockito.when(factory.mPhoneUtils.getCanonicalBySimLocale(Matchers.anyString())).thenAnswer( in registerWithFakeContext()
107 Mockito.when(factory.mPhoneUtils.formatForDisplay(Matchers.anyString())).thenAnswer( in registerWithFakeContext()
/packages/apps/TV/tests/robotests/src/com/android/tv/data/
DTvInputNewComparatorTest.java57 .thenAnswer( in testComparator()
66 .thenAnswer( in testComparator()
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/
DNotificationAssistantPickerTest.java133 when(mContext.getString(anyInt(), anyString())).thenAnswer( in noDialogOnNoAssistantSelected()
144 when(mContext.getString(anyInt(), anyString())).thenAnswer( in dialogTextHasAssistantName()
/packages/apps/Car/Launcher/libs/appgrid/lib/tests/src/com/android/car/carlauncher/
DAppLauncherUtilsTest.java466 .thenAnswer(args -> { in mockPackageManagerQueries()
476 when(mMockPackageManager.queryIntentActivities(any(), any())).thenAnswer(args -> { in mockPackageManagerQueries()
508 when(mMockPackageManager.queryIntentServices(any(), anyInt())).thenAnswer(args -> { in mockTosPackageManagerQueries()
515 when(mMockPackageManager.queryIntentActivities(any(), any())).thenAnswer(args -> { in mockTosPackageManagerQueries()
538 .thenAnswer(args -> { in mockSettingsStringCalls()
/packages/apps/Settings/tests/legacy_unit/src/com/android/settings/display/
DThemePreferenceControllerTest.java76 when(mMockPackageManager.getApplicationInfo(any(), anyInt())).thenAnswer(inv -> { in testUpdateState()
112 when(mMockPackageManager.getApplicationInfo(any(), anyInt())).thenAnswer(inv -> { in testUpdateState_withStaticOverlay()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/
DAppStorageSettingsTest.java74 .thenAnswer(invocation -> { in setUp()
80 .thenAnswer(invocation -> { in setUp()
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/
DBluetoothDetailsButtonsControllerTest.java68 .thenAnswer(invocation -> { in setUp()
74 .thenAnswer(invocation -> { in setUp()
/packages/apps/Launcher3/tests/multivalentTests/src/com/android/launcher3/util/
DDisplayControllerTest.kt103 .thenAnswer( in <lambda>()
111 whenever(windowManagerProxy.getRealBounds(any(), any())).thenAnswer { i -> in <lambda>()
/packages/providers/MediaProvider/photopicker/tests/src/com/android/photopicker/utils/
DMockitoUtils.kt36 Mockito.`when`(mock).thenAnswer { block(it) } in whenever()

123456