Home
last modified time | relevance | path

Searched refs:mockResponse (Results 1 – 7 of 7) sorted by relevance

/packages/modules/AdServices/adservices/tests/unittest/service-core/appsearch/src/com/android/adservices/service/appsearch/
DAppSearchDaoTest.java301 SetSchemaResponse mockResponse = Mockito.mock(SetSchemaResponse.class); in testWriteConsentData_failure() local
303 .thenReturn(Futures.immediateFuture(mockResponse)); in testWriteConsentData_failure()
313 when(mockResponse.getMigrationFailures()).thenReturn(List.of(failure)); in testWriteConsentData_failure()
346 SetSchemaResponse mockResponse = Mockito.mock(SetSchemaResponse.class); in testWriteConsentData() local
348 .thenReturn(Futures.immediateFuture(mockResponse)); in testWriteConsentData()
350 verify(mockResponse, atMost(1)).getMigrationFailures(); in testWriteConsentData()
351 when(mockResponse.getMigrationFailures()).thenReturn(List.of()); in testWriteConsentData()
372 SetSchemaResponse mockResponse = Mockito.mock(SetSchemaResponse.class); in testWriteConsentData_timeout() local
374 .thenReturn(Futures.immediateFuture(mockResponse)); in testWriteConsentData_timeout()
376 verify(mockResponse, atMost(1)).getMigrationFailures(); in testWriteConsentData_timeout()
[all …]
DAppSearchConsentWorkerTest.java882 SetSchemaResponse mockResponse = Mockito.mock(SetSchemaResponse.class); in initSuccessResponse() local
884 .thenReturn(Futures.immediateFuture(mockResponse)); in initSuccessResponse()
888 verify(mockResponse, atMost(1)).getMigrationFailures(); in initSuccessResponse()
889 when(mockResponse.getMigrationFailures()).thenReturn(List.of()); in initSuccessResponse()
902 SetSchemaResponse mockResponse = Mockito.mock(SetSchemaResponse.class); in initTimeoutResponse() local
904 .thenReturn(Futures.immediateFuture(mockResponse)); in initTimeoutResponse()
908 verify(mockResponse, atMost(1)).getMigrationFailures(); in initTimeoutResponse()
909 when(mockResponse.getMigrationFailures()).thenReturn(List.of()); in initTimeoutResponse()
918 SetSchemaResponse mockResponse = Mockito.mock(SetSchemaResponse.class); in initFailureResponse() local
920 .thenReturn(Futures.immediateFuture(mockResponse)); in initFailureResponse()
[all …]
/packages/modules/AdServices/adservices/tests/cts/src/android/adservices/debuggablects/
DMeasurementCtsDebuggableTest.java375 final MockResponse mockResponse = createRegisterSourceResponse(); in executeRegisterSource() local
376 final MockWebServer mockWebServer = startServer(DEFAULT_PORT, mockResponse); in executeRegisterSource()
405 final MockResponse mockResponse = createRegisterTriggerResponse(); in executeRegisterTrigger() local
406 final MockWebServer mockWebServer = startServer(DEFAULT_PORT, mockResponse); in executeRegisterTrigger()
434 final MockResponse mockResponse = createRegisterWebSourceResponse(); in executeRegisterWebSource() local
435 final MockWebServer mockWebServer = startServer(DEFAULT_PORT, mockResponse); in executeRegisterWebSource()
469 final MockResponse mockResponse = createRegisterWebTriggerResponse(); in executeRegisterWebTrigger() local
470 final MockWebServer mockWebServer = startServer(DEFAULT_PORT, mockResponse); in executeRegisterWebTrigger()
503 final MockResponse mockResponse = createGetAggregationKeyResponse(); in executeAttribution() local
504 final MockWebServer mockWebServer = startServer(KEYS_PORT, mockResponse); in executeAttribution()
[all …]
/packages/modules/AdServices/adservices/tests/perf/src/android/adservices/test/scenario/adservices/
DMeasurementRegisterCalls.java354 final MockResponse mockResponse = createRegisterSourceResponse(); in executeRegisterSource() local
355 final MockWebServer mockWebServer = startServer(DEFAULT_PORT, mockResponse); in executeRegisterSource()
379 final MockResponse mockResponse = createRegisterTriggerResponse(); in executeRegisterTrigger() local
380 final MockWebServer mockWebServer = startServer(DEFAULT_PORT, mockResponse); in executeRegisterTrigger()
403 final MockResponse mockResponse = createRegisterWebSourceResponse(); in executeRegisterWebSource() local
404 final MockWebServer mockWebServer = startServer(DEFAULT_PORT, mockResponse); in executeRegisterWebSource()
433 final MockResponse mockResponse = createRegisterWebTriggerResponse(); in executeRegisterWebTrigger() local
434 final MockWebServer mockWebServer = startServer(DEFAULT_PORT, mockResponse); in executeRegisterWebTrigger()
462 final MockResponse mockResponse = createGetAggregationKeyResponse(); in executeAttribution() local
463 final MockWebServer mockWebServer = startServer(KEYS_PORT, mockResponse); in executeAttribution()
[all …]
/packages/modules/AdServices/adservices/tests/cts/src/android/adservices/utils/
DScenarioDispatcher.java168 Scenario.Response mockResponse = Objects.requireNonNull(mock).getDefaultResponse(); in dispatch() local
169 String body = mockResponse.getBody(); in dispatch()
175 Thread.sleep(mockResponse.getDelaySeconds() * 1000L); in dispatch()
187 for (Map.Entry<String, String> mockHeader : mockResponse.getHeaders().entrySet()) { in dispatch()
/packages/modules/ExtServices/java/tests/src/android/ext/services/common/
DAdServicesAppsearchDeleteJobTest.java137 SetSchemaResponse mockResponse = Mockito.mock(SetSchemaResponse.class); in deleteAppsearchDb_onMigrationfailure_shouldBeFalse() local
144 when(mockResponse.getMigrationFailures()).thenReturn(List.of(failure)); in deleteAppsearchDb_onMigrationfailure_shouldBeFalse()
145 doReturn(mockResponse).when(mAdServicesAppsearchDeleteJob).getDeleteSchemaResponse( in deleteAppsearchDb_onMigrationfailure_shouldBeFalse()
165 SetSchemaResponse mockResponse = Mockito.mock(SetSchemaResponse.class); in deleteAppsearchDb_onSuccess_shouldBeTrue() local
166 when(mockResponse.getMigrationFailures()).thenReturn(new ArrayList<>()); in deleteAppsearchDb_onSuccess_shouldBeTrue()
167 doReturn(mockResponse).when(mAdServicesAppsearchDeleteJob).getDeleteSchemaResponse( in deleteAppsearchDb_onSuccess_shouldBeTrue()
/packages/modules/CaptivePortalLogin/tests/src/com/android/captiveportallogin/
DCaptivePortalLoginActivityTest.java809 final MockResponse mockResponse = mResponses.get(session.getQueryParameterString()); in serve() local
810 if (mockResponse == null) { in serve()
816 mockResponse.mMimetype, in serve()
820 + "<body>" + mockResponse.mBody + "</body>" in serve()
822 mockResponse.mHeaders.forEach(response::addHeader); in serve()