Home
last modified time | relevance | path

Searched refs:invocation (Results 1 – 25 of 88) sorted by relevance

1234

/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
DSystemStateHelperTest.java56 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 …]
DComponentContextFixture.java26 import org.mockito.invocation.InvocationOnMock;
494 public List<ResolveInfo> answer(InvocationOnMock invocation) throws Throwable {
496 (Intent) invocation.getArguments()[0],
497 (Integer) invocation.getArguments()[1]);
503 public List<ResolveInfo> answer(InvocationOnMock invocation) throws Throwable {
505 (Intent) invocation.getArguments()[0],
506 (Integer) invocation.getArguments()[1]);
527 public Void answer(InvocationOnMock invocation) throws Throwable {
593 public String answer(InvocationOnMock invocation) {
594 Object[] args = invocation.getArguments();
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/
DTestUtils.java74 (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/
DTvInputManagerHelperTest.java34 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/
DMockCameraFactory.java24 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/ThemePicker/robolectric_tests/src/com/android/customization/testutils/
DOverlayManagerMocks.java110 (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/
DFakeFactory.java46 import org.mockito.invocation.InvocationOnMock;
92 public String answer(final InvocationOnMock invocation) throws Throwable { in registerWithFakeContext()
93 final Object[] args = invocation.getArguments(); in registerWithFakeContext()
101 public String answer(final InvocationOnMock invocation) throws Throwable { in registerWithFakeContext()
102 final Object[] args = invocation.getArguments(); in registerWithFakeContext()
110 public String answer(final InvocationOnMock invocation) throws Throwable { in registerWithFakeContext()
111 return (String) invocation.getArguments()[0]; in registerWithFakeContext()
/packages/apps/TV/tests/robotests/src/com/android/tv/data/
DTvInputNewComparatorTest.java33 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/recommendation/
DRecommendationUtils.java31 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/unit/src/com/android/tv/data/
DChannelImplTest.java41 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/notification/
DNotificationAssistantPickerTest.java43 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/
DTestNotificationManager.java29 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/Settings/tests/robotests/src/com/android/settings/applications/
DAppStorageSettingsTest.java66 .thenAnswer(invocation -> { in setUp()
67 final Object[] args = invocation.getArguments(); in setUp()
72 .thenAnswer(invocation -> { in setUp()
73 final Object[] args = invocation.getArguments(); in setUp()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/provisioning/
DProvisioningManagerTest.java53 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/Car/libs/car-ui-lib/tests/robotests/src/com/android/car/ui/
DCarUiTestUtil.java49 doAnswer(invocation -> tempInflater.cloneInContext(context)) in getMockContext()
55 doAnswer(invocation -> { in getMockContext()
56 Object[] args = invocation.getArguments(); in getMockContext()
/packages/apps/Settings/tests/unit/src/com/android/settings/vpn2/
DPreferenceListTest.java63 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/fuelgauge/
DPowerUsageSummaryTest.java70 import org.mockito.invocation.InvocationOnMock;
255 public Object answer(InvocationOnMock invocation) { in showBothEstimates_summariesAreBothModified()
257 R.string.power_usage_old_debug, invocation.getArguments()[0]); in showBothEstimates_summariesAreBothModified()
262 public Object answer(InvocationOnMock invocation) { in showBothEstimates_summariesAreBothModified()
264 R.string.power_usage_enhanced_debug, invocation.getArguments()[0]); in showBothEstimates_summariesAreBothModified()
308 doAnswer(invocation -> { in optionsMenu_clickAdvancedPage_fireIntent()
/packages/services/Telephony/tests/src/com/android/services/telephony/rcs/
DUserCapabilityExchangeImplTest.java174 doAnswer(invocation -> { in testRequestPublicationWithSuccessfulResponse()
199 doAnswer(invocation -> { in testRequestPublicationWithFailedResponse()
226 doAnswer(invocation -> { in testRequestCapability()
245 doAnswer(invocation -> { in testUpdatePublisherState()
262 doAnswer(invocation -> { in testUnpublish()
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/
DBluetoothDetailsButtonsControllerTest.java65 .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/modules/NetworkStack/tests/unit/src/com/android/server/connectivity/
DNetworkMonitorTest.java170 import org.mockito.invocation.InvocationOnMock;
400 doAnswer(invocation -> { in startMocking()
401 return getAllByName(invocation.getMock(), invocation.getArgument(0)); in startMocking()
405 doAnswer(invocation -> { in startMocking()
406 return mockQuery(invocation, 1 /* posHostname */, 3 /* posExecutor */, in startMocking()
411 doAnswer(invocation -> { in startMocking()
412 return mockQuery(invocation, 1 /* posHostname */, 4 /* posExecutor */, in startMocking()
418 private Answer mockQuery(InvocationOnMock invocation, int posHostname, int posExecutor, in mockQuery() argument
420 String hostname = (String) invocation.getArgument(posHostname); in mockQuery()
421 Executor executor = (Executor) invocation.getArgument(posExecutor); in mockQuery()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/enterprise/
DEnterpriseInstalledPackagesPreferenceControllerTest.java40 import org.mockito.invocation.InvocationOnMock;
66 public Object answer(InvocationOnMock invocation) { in setNumberOfEnterpriseInstalledPackages()
68 invocation.getArguments()[1]).onNumberOfAppsResult(number); in setNumberOfEnterpriseInstalledPackages()
DAdminGrantedPermissionsPreferenceControllerTestBase.java39 import org.mockito.invocation.InvocationOnMock;
70 public Object answer(InvocationOnMock invocation) { in setNumberOfPackagesWithAdminGrantedPermissions()
72 invocation.getArguments()[2]).onNumberOfAppsResult(number); in setNumberOfPackagesWithAdminGrantedPermissions()
/packages/apps/StorageManager/robotests/src/com/android/storagemanager/automatic/
DJobPreconditionsTest.java36 import org.mockito.invocation.InvocationOnMock;
116 public NetworkInfo answer(InvocationOnMock invocation) { in hookUpMocks()
117 Network network = (Network) invocation.getArguments()[0]; in hookUpMocks()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/
DCarBluetoothServiceTest.java40 import org.mockito.invocation.InvocationOnMock;
96 public Void answer(InvocationOnMock invocation) throws Throwable { in setUp()
97 Object[] arguments = invocation.getArguments(); in setUp()
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/
DFakeSystemFacade.java21 import org.mockito.invocation.InvocationOnMock;
84 public URLConnection answer(InvocationOnMock invocation) throws Throwable { in getNetwork()
85 final URL url = (URL) invocation.getArguments()[0]; in getNetwork()

1234