/packages/services/Car/car-test-lib/src/android/car/test/mocks/ |
D | AbstractExtendedMockitoTestCase.java | 53 import org.mockito.invocation.InvocationOnMock; 296 doAnswer((invocation) -> { in interceptWtfCalls() argument 297 return addWtf(invocation); in interceptWtfCalls() 299 doAnswer((invocation) -> { in interceptWtfCalls() argument 300 return addWtf(invocation); in interceptWtfCalls() 302 doAnswer((invocation) -> { in interceptWtfCalls() argument 303 return addWtf(invocation); in interceptWtfCalls() 305 doAnswer((invocation) -> { in interceptWtfCalls() argument 306 return addWtf(invocation); in interceptWtfCalls() 310 private Object addWtf(InvocationOnMock invocation) { in addWtf() argument [all …]
|
D | SyncAnswer.java | 21 import org.mockito.invocation.InvocationOnMock; 77 public T answer(InvocationOnMock invocation) throws Throwable { in answer() argument 78 Log.v(TAG, "answering " + invocation); in answer()
|
D | BlockingAnswer.java | 25 import org.mockito.invocation.InvocationOnMock; 102 public T answer(InvocationOnMock invocation) throws Throwable { in answer() argument 109 mInvocator.visit(invocation); in answer()
|
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
D | SystemStateHelperTest.java | 56 import org.mockito.invocation.InvocationOnMock; 166 doAnswer(invocation -> { in testDeviceOnEarCorrectlyDetected() 167 SensorEventListener listener = invocation.getArgument(0); in testDeviceOnEarCorrectlyDetected() 168 Sensor sensor = invocation.getArgument(1); in testDeviceOnEarCorrectlyDetected() 187 doAnswer(invocation -> { in testDeviceIsNotOnEarWithProxNotSensed() 188 SensorEventListener listener = invocation.getArgument(0); in testDeviceIsNotOnEarWithProxNotSensed() 189 Sensor sensor = invocation.getArgument(1); in testDeviceIsNotOnEarWithProxNotSensed() 207 doAnswer(invocation -> { in testDeviceIsNotOnEarWithWrongOrientation() 208 SensorEventListener listener = invocation.getArgument(0); in testDeviceIsNotOnEarWithWrongOrientation() 209 Sensor sensor = invocation.getArgument(1); in testDeviceIsNotOnEarWithWrongOrientation() [all …]
|
D | ComponentContextFixture.java | 26 import org.mockito.invocation.InvocationOnMock; 503 public List<ResolveInfo> answer(InvocationOnMock invocation) throws Throwable { 505 (Intent) invocation.getArguments()[0], 506 (Integer) invocation.getArguments()[1]); 512 public List<ResolveInfo> answer(InvocationOnMock invocation) throws Throwable { 514 (Intent) invocation.getArguments()[0], 515 (Integer) invocation.getArguments()[1]); 521 public List<ResolveInfo> answer(InvocationOnMock invocation) throws Throwable { 523 (Intent) invocation.getArguments()[0], 524 (Integer) invocation.getArguments()[1]); [all …]
|
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ |
D | TestUtils.java | 74 (invocation) -> { in makeSpyLogThrowExceptionForWtf() argument 75 throw new IllegalStateException((String) invocation.getArguments()[1]); in makeSpyLogThrowExceptionForWtf() 81 (invocation) -> { in makeSpyLogThrowExceptionForWtf() argument 82 throw (Throwable) invocation.getArguments()[2]; in makeSpyLogThrowExceptionForWtf() 94 (invocation) -> { in makeSpyLogDoLogErrorForWtf() argument 96 "Mock logging WTF: " + invocation.getArguments()[0], in makeSpyLogDoLogErrorForWtf() 97 (String) invocation.getArguments()[1]); in makeSpyLogDoLogErrorForWtf() 104 (invocation) -> { in makeSpyLogDoLogErrorForWtf() argument 106 "Mock logging WTF: " + invocation.getArguments()[0], in makeSpyLogDoLogErrorForWtf() 107 (String) invocation.getArguments()[1], in makeSpyLogDoLogErrorForWtf() [all …]
|
/packages/apps/TV/tests/unit/src/com/android/tv/util/ |
D | TvInputManagerHelperTest.java | 34 import org.mockito.invocation.InvocationOnMock; 225 public Boolean answer(InvocationOnMock invocation) throws Throwable { in createMockTvInputManager() 226 TvInputInfo info = (TvInputInfo) invocation.getArguments()[0]; in createMockTvInputManager() 235 public String answer(InvocationOnMock invocation) throws Throwable { in createMockTvInputManager() 236 TvInputInfo info = (TvInputInfo) invocation.getArguments()[0]; in createMockTvInputManager() 245 public String answer(InvocationOnMock invocation) throws Throwable { in createMockTvInputManager() 246 TvInputInfo info = (TvInputInfo) invocation.getArguments()[0]; in createMockTvInputManager() 255 public TvInputInfo answer(InvocationOnMock invocation) in createMockTvInputManager() 257 String inputId = (String) invocation.getArguments()[0]; in createMockTvInputManager()
|
/packages/apps/Messaging/tests/src/com/android/messaging/ui/mediapicker/ |
D | MockCameraFactory.java | 24 import org.mockito.invocation.InvocationOnMock; 53 public Camera answer(InvocationOnMock invocation) { in createCameraWrapper() 54 return cameras[(Integer) invocation.getArguments()[0]]; in createCameraWrapper() 59 public Void answer(InvocationOnMock invocation) throws Throwable { in createCameraWrapper() 61 cameras[(Integer) invocation.getArguments()[0]], in createCameraWrapper() 62 (CameraInfo) invocation.getArguments()[1] in createCameraWrapper()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/ |
D | ManageExternalStorageDetailsTest.java | 163 Answer<Void> answerSetUidMode = invocation -> { in mockAppOpsOperations() 164 int code = invocation.getArgument(0); in mockAppOpsOperations() 165 int uid = invocation.getArgument(1); in mockAppOpsOperations() 166 int mode = invocation.getArgument(2); in mockAppOpsOperations() 180 Answer<PermissionState> answerPermState = invocation -> { in mockAppOpsOperations() 181 String packageName = invocation.getArgument(0); in mockAppOpsOperations() 182 int uid = invocation.getArgument(1); in mockAppOpsOperations()
|
/packages/apps/ThemePicker/robolectric_tests/src/com/android/customization/testutils/ |
D | OverlayManagerMocks.java | 110 (Answer<Boolean>) invocation -> in setUpMock() 111 setEnabled(invocation.getArgument(0), in setUpMock() 113 invocation.getArgument(1))); in setUpMock() 116 (Answer<Boolean>) invocation -> in setUpMock() 118 invocation.getArgument(0), in setUpMock() 120 invocation.getArgument(1))); in setUpMock()
|
/packages/apps/Messaging/tests/src/com/android/messaging/ |
D | FakeFactory.java | 46 import org.mockito.invocation.InvocationOnMock; 91 public String answer(final InvocationOnMock invocation) throws Throwable { in registerWithFakeContext() 92 final Object[] args = invocation.getArguments(); in registerWithFakeContext() 100 public String answer(final InvocationOnMock invocation) throws Throwable { in registerWithFakeContext() 101 final Object[] args = invocation.getArguments(); in registerWithFakeContext() 109 public String answer(final InvocationOnMock invocation) throws Throwable { in registerWithFakeContext() 110 return (String) invocation.getArguments()[0]; in registerWithFakeContext()
|
/packages/apps/Car/RotaryController/tests/unit/src/com/android/car/rotary/ |
D | NodeBuilder.java | 143 doAnswer(invocation -> { in build() 153 doAnswer(invocation -> { in build() 154 Object[] args = invocation.getArguments(); in build() 170 doAnswer(invocation -> { in build() 171 Object[] args = invocation.getArguments(); in build() 175 doAnswer(invocation -> { in build() 176 Object[] args = invocation.getArguments(); in build() 183 doAnswer(invocation -> { in build()
|
/packages/apps/TV/tests/unit/src/com/android/tv/recommendation/ |
D | RecommendationUtils.java | 31 import org.mockito.invocation.InvocationOnMock; 44 public Integer answer(InvocationOnMock invocation) throws Throwable { in createMockRecommendationDataManager() 53 public Collection<ChannelRecord> answer(InvocationOnMock invocation) in createMockRecommendationDataManager() 63 public ChannelRecord answer(InvocationOnMock invocation) throws Throwable { in createMockRecommendationDataManager() 64 long channelId = (long) invocation.getArguments()[0]; in createMockRecommendationDataManager()
|
/packages/apps/TV/tests/robotests/src/com/android/tv/data/ |
D | TvInputNewComparatorTest.java | 33 import org.mockito.invocation.InvocationOnMock; 60 public Boolean answer(InvocationOnMock invocation) throws Throwable { in testComparator() 61 String inputId = (String) invocation.getArguments()[0]; in testComparator() 69 public Boolean answer(InvocationOnMock invocation) throws Throwable { in testComparator() 70 String inputId = (String) invocation.getArguments()[0]; in testComparator()
|
/packages/apps/TV/tests/unit/src/com/android/tv/data/ |
D | ChannelImplTest.java | 41 import org.mockito.invocation.InvocationOnMock; 104 public ActivityInfo answer(InvocationOnMock invocation) { in setUp() 114 invocation in setUp() 264 public Boolean answer(InvocationOnMock invocation) throws Throwable { in testComparator() 265 String inputId = (String) invocation.getArguments()[0]; in testComparator() 318 public Boolean answer(InvocationOnMock invocation) throws Throwable { in testComparatorLabel() 319 String inputId = (String) invocation.getArguments()[0]; in testComparatorLabel()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/telephony/ |
D | NetworkScanHelperTest.java | 42 import org.mockito.invocation.InvocationOnMock; 102 public Object answer(InvocationOnMock invocation) throws Throwable { in startNetworkScan_incrementalAndSuccess_completionWithResult() 105 (invocation.getArguments()[2]); in startNetworkScan_incrementalAndSuccess_completionWithResult() 139 public Object answer(InvocationOnMock invocation) throws Throwable { in startNetworkScan_incrementalAndFailure_failureWithErrorCode() 142 (invocation.getArguments()[2]); in startNetworkScan_incrementalAndFailure_failureWithErrorCode()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ |
D | NotificationAssistantPickerTest.java | 43 import org.mockito.invocation.InvocationOnMock; 134 (InvocationOnMock invocation) -> { in noDialogOnNoAssistantSelected() 135 return invocation.getArgument(1); in noDialogOnNoAssistantSelected() 145 (InvocationOnMock invocation) -> { in dialogTextHasAssistantName() 146 return invocation.getArgument(1); in dialogTextHasAssistantName()
|
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/services/ |
D | TestNotificationManager.java | 29 import org.mockito.invocation.InvocationOnMock; 54 private Void invoke(InvocationOnMock invocation) { in invoke() argument 55 Object[] args = invocation.getArguments(); in invoke() 56 switch (invocation.getMethod().getName()) { in invoke()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/applications/ |
D | ApplicationActionButtonsPreferenceControllerTest.java | 194 when(mMockPm.getHomeActivities(anyList())).then(invocation -> { in onCreate_bundledApp_homePackage_disablesDisableButton() 195 Object[] args = invocation.getArguments(); in onCreate_bundledApp_homePackage_disablesDisableButton() 297 when(mMockPm.getHomeActivities(anyList())).then(invocation -> { in onStart_noDefaultHome_onlyHomeApp_disablesUninstallButton() 298 Object[] args = invocation.getArguments(); in onStart_noDefaultHome_onlyHomeApp_disablesUninstallButton() 323 when(mMockPm.getHomeActivities(anyList())).then(invocation -> { in onStart_noDefaultHome_multipleHomeApps_enablesUninstallButton() 324 Object[] args = invocation.getArguments(); in onStart_noDefaultHome_multipleHomeApps_enablesUninstallButton() 349 when(mMockPm.getHomeActivities(anyList())).then(invocation -> { in onStart_defaultHomeApp_disablesUninstallButton() 350 Object[] args = invocation.getArguments(); in onStart_defaultHomeApp_disablesUninstallButton()
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/provisioning/ |
D | ProvisioningManagerTest.java | 53 import org.mockito.invocation.InvocationOnMock; 89 (InvocationOnMock invocation) -> { in setUp() 90 Message msg = (Message) invocation.getArguments()[0]; in setUp() 175 doAnswer((InvocationOnMock invocation) -> { in testListener_preFinalizationCompleted() argument
|
/packages/apps/Settings/tests/unit/src/com/android/settings/vpn2/ |
D | PreferenceListTest.java | 63 doAnswer(invocation -> { in setUp() 64 final String key = ((VpnProfile)(invocation.getArguments()[0])).key; in setUp() 71 doAnswer(invocation -> { in setUp() 72 final AppVpnInfo key = (AppVpnInfo)(invocation.getArguments()[0]); in setUp()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/ |
D | AppStorageSettingsTest.java | 74 .thenAnswer(invocation -> { in setUp() 75 final Object[] args = invocation.getArguments(); in setUp() 80 .thenAnswer(invocation -> { in setUp() 81 final Object[] args = invocation.getArguments(); in setUp()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/ |
D | BluetoothDetailsButtonsControllerTest.java | 65 .thenAnswer(invocation -> { in setUp() 66 final Object[] args = invocation.getArguments(); in setUp() 71 .thenAnswer(invocation -> { in setUp() 72 final Object[] args = invocation.getArguments(); in setUp()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/ |
D | PowerUsageSummaryTest.java | 70 import org.mockito.invocation.InvocationOnMock; 257 public Object answer(InvocationOnMock invocation) { in showBothEstimates_summariesAreBothModified() 259 R.string.power_usage_old_debug, invocation.getArguments()[0]); in showBothEstimates_summariesAreBothModified() 264 public Object answer(InvocationOnMock invocation) { in showBothEstimates_summariesAreBothModified() 266 R.string.power_usage_enhanced_debug, invocation.getArguments()[0]); in showBothEstimates_summariesAreBothModified() 310 doAnswer(invocation -> { in optionsMenu_clickAdvancedPage_fireIntent()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/ |
D | CarUserServiceTest.java | 719 doAnswer((invocation) -> { in testRemoveUser_LastAdminUser_success() argument 741 doAnswer((invocation) -> { in testRemoveUser_notLastAdminUser_success() argument 759 doAnswer((invocation) -> { in testRemoveUser_success() argument 1809 doAnswer((invocation) -> { in mockGetInitialInfo() argument 1810 Log.d(TAG, "Answering " + invocation + " with " + response); in mockGetInitialInfo() 1813 (HalCallback<InitialUserInfoResponse>) invocation.getArguments()[3]; in mockGetInitialInfo() 1835 doAnswer((invocation) -> { in mockHalCreateUser() argument 1836 Log.d(TAG, "Answering " + invocation + " with " + response); in mockHalCreateUser() 1839 (HalCallback<CreateUserResponse>) invocation.getArguments()[2]; in mockHalCreateUser() 1876 BlockingAnswer<Void> blockingAnswer = BlockingAnswer.forVoidReturn(10_000, (invocation) -> { in mockHalSwitchLateResponse() [all …]
|