/packages/modules/AdServices/adservices/tests/unittest/service-core/protectedaudience/src/com/android/adservices/service/customaudience/ |
D | CustomAudienceImplTest.java | 111 @Mock private Clock mClockMock; field in CustomAudienceImplTest 123 mClockMock, in setup() 131 when(mClockMock.instant()).thenReturn(CommonFixture.FIXED_NOW_TRUNCATED_TO_MILLI); in testJoinCustomAudience_runNormally() 145 verify(mClockMock).instant(); in testJoinCustomAudience_runNormally() 149 verifyNoMoreInteractions(mClockMock, mCustomAudienceDaoMock, mCustomAudienceValidatorMock); in testJoinCustomAudience_runNormally() 155 when(mClockMock.instant()).thenReturn(CommonFixture.FIXED_NOW_TRUNCATED_TO_MILLI); in testJoinCustomAudience_runNormallyWithComponentAds() 180 verify(mClockMock).instant(); in testJoinCustomAudience_runNormallyWithComponentAds() 184 verifyNoMoreInteractions(mClockMock, mCustomAudienceDaoMock, mCustomAudienceValidatorMock); in testJoinCustomAudience_runNormallyWithComponentAds() 189 when(mClockMock.instant()).thenReturn(CommonFixture.FIXED_NOW_TRUNCATED_TO_MILLI); in testJoinCustomAudience_withDevOptionsEnabled() 205 verify(mClockMock).instant(); in testJoinCustomAudience_withDevOptionsEnabled() [all …]
|
D | BackgroundFetchWorkerTest.java | 112 @Mock private Clock mClockMock; field in BackgroundFetchWorkerTest 162 mClockMock, in setup() 175 mClockMock, in testBackgroundFetchWorkerNullInputsCauseFailure() 185 mClockMock, in testBackgroundFetchWorkerNullInputsCauseFailure() 195 mClockMock, in testBackgroundFetchWorkerNullInputsCauseFailure() 214 mClockMock, in testBackgroundFetchWorkerNullInputsCauseFailure() 271 mClockMock, in testRunBackgroundFetchThrowsTimeoutDuringUpdates() 285 when(mClockMock.instant()).thenReturn(Instant.now()); in testRunBackgroundFetchThrowsTimeoutDuringUpdates() 321 when(mClockMock.instant()).thenReturn(CommonFixture.FIXED_NOW); 347 mClockMock, [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/protectedaudience/src/com/android/adservices/service/stats/ |
D | SelectAdsFromOutcomesExecutionLoggerImplTest.java | 51 @Mock private Clock mClockMock; field in SelectAdsFromOutcomesExecutionLoggerImplTest 65 when(mClockMock.elapsedRealtime()) in testSelectAdsFromOutcomesExecutionLogger_successDownloadAndExecution() 73 new SelectAdsFromOutcomesExecutionLoggerImpl(mClockMock, mAdServicesLoggerMock); in testSelectAdsFromOutcomesExecutionLogger_successDownloadAndExecution() 105 when(mClockMock.elapsedRealtime()) in testSelectAdsFromOutcomesExecutionLogger_missingStartOfDownload() 110 new SelectAdsFromOutcomesExecutionLoggerImpl(mClockMock, mAdServicesLoggerMock); in testSelectAdsFromOutcomesExecutionLogger_missingStartOfDownload() 142 when(mClockMock.elapsedRealtime()) in testSelectAdsFromOutcomesExecutionLogger_repeatedEndOfDownload() 151 new SelectAdsFromOutcomesExecutionLoggerImpl(mClockMock, mAdServicesLoggerMock); in testSelectAdsFromOutcomesExecutionLogger_repeatedEndOfDownload() 185 when(mClockMock.elapsedRealtime()) in testSelectAdsFromOutcomesExecutionLogger_missingStartOfExecution() 189 new SelectAdsFromOutcomesExecutionLoggerImpl(mClockMock, mAdServicesLoggerMock); in testSelectAdsFromOutcomesExecutionLogger_missingStartOfExecution() 222 when(mClockMock.elapsedRealtime()) in testSelectAdsFromOutcomesExecutionLogger_repeatedEndOfExecution() [all …]
|
D | UpdateCustomAudienceExecutionLoggerTest.java | 47 @Mock private Clock mClockMock; field in UpdateCustomAudienceExecutionLoggerTest 60 when(mClockMock.elapsedRealtime()) in testUpdateCustomAudienceExecutionLogger_Success() 66 new UpdateCustomAudienceExecutionLogger(mClockMock, mAdServicesLoggerMock); in testUpdateCustomAudienceExecutionLogger_Success() 85 when(mClockMock.elapsedRealtime()).thenReturn(START_ELAPSED_TIMESTAMP); in testUpdateCustomAudienceExecutionLogger_missingStart() 87 new UpdateCustomAudienceExecutionLogger(mClockMock, mAdServicesLoggerMock); in testUpdateCustomAudienceExecutionLogger_missingStart() 99 when(mClockMock.elapsedRealtime()) in testUpdateCustomAudienceExecutionLogger_RepeatedClose() 105 new UpdateCustomAudienceExecutionLogger(mClockMock, mAdServicesLoggerMock); in testUpdateCustomAudienceExecutionLogger_RepeatedClose()
|
D | BackgroundFetchExecutionLoggerTest.java | 46 @Mock private Clock mClockMock; field in BackgroundFetchExecutionLoggerTest 59 when(mClockMock.elapsedRealtime()) in testBackgroundFetchExecutionLogger_SuccessBackgroundFetch() 66 new BackgroundFetchExecutionLogger(mClockMock, mAdServicesLoggerMock); in testBackgroundFetchExecutionLogger_SuccessBackgroundFetch() 85 when(mClockMock.elapsedRealtime()).thenReturn(START_ELAPSED_TIMESTAMP); in testBackgroundFetchExecutionLogger_missingStartBackgroundFetch() 87 new BackgroundFetchExecutionLogger(mClockMock, mAdServicesLoggerMock); in testBackgroundFetchExecutionLogger_missingStartBackgroundFetch() 99 when(mClockMock.elapsedRealtime()) in testBackgroundFetchExecutionLogger_repeatedEndBackgroundFetch() 102 new BackgroundFetchExecutionLogger(mClockMock, mAdServicesLoggerMock); in testBackgroundFetchExecutionLogger_repeatedEndBackgroundFetch()
|
D | ServerAuctionKeyFetchExecutionLoggerImplTest.java | 49 @Mock private Clock mClockMock; field in ServerAuctionKeyFetchExecutionLoggerImplTest 62 when(mClockMock.elapsedRealtime()) in testServerAuctionKeyFetchExecutionLogger_successNetworkKeyFetch() 67 new ServerAuctionKeyFetchExecutionLoggerImpl(mClockMock, mAdServicesLoggerMock); in testServerAuctionKeyFetchExecutionLogger_successNetworkKeyFetch() 99 new ServerAuctionKeyFetchExecutionLoggerImpl(mClockMock, mAdServicesLoggerMock); in testServerAuctionKeyFetchExecutionLogger_successDatabaseKeyFetch() 127 when(mClockMock.elapsedRealtime()) in testServerAuctionKeyFetchExecutionLogger_NetworkKeyFetch_WrongEncryptionKeySource() 132 new ServerAuctionKeyFetchExecutionLoggerImpl(mClockMock, mAdServicesLoggerMock); in testServerAuctionKeyFetchExecutionLogger_NetworkKeyFetch_WrongEncryptionKeySource() 165 new ServerAuctionKeyFetchExecutionLoggerImpl(mClockMock, mAdServicesLoggerMock); in testServerAuctionKeyFetchExecutionLogger_DatabaseKeyFetch_WrongEncryptionKeySource() 192 new ServerAuctionKeyFetchExecutionLoggerImpl(mClockMock, mAdServicesLoggerMock); in testServerAuctionKeyFetchExecutionLogger_missingStartOfGetAdSelectionData() 225 when(mClockMock.elapsedRealtime()) in testServerAuctionKeyFetchExecutionLogger_redundantEndOfGetAdSelectionData() 228 new ServerAuctionKeyFetchExecutionLoggerImpl(mClockMock, mAdServicesLoggerMock); in testServerAuctionKeyFetchExecutionLogger_redundantEndOfGetAdSelectionData()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/protectedaudience/src/com/android/adservices/service/adselection/debug/ |
D | DebugReportSenderWorkerTest.java | 68 private Clock mClockMock; field in DebugReportSenderWorkerTest 74 mClockMock = Clock.systemUTC(); in setup() 77 mAdSelectionDebugReportDao, mHttpsClient, mFlags, mClockMock); in setup() 84 () -> new DebugReportSenderWorker(null, mHttpsClient, mFlags, mClockMock)); in testNullParamsInConstructor() 89 mAdSelectionDebugReportDao, null, mFlags, mClockMock)); in testNullParamsInConstructor() 94 mAdSelectionDebugReportDao, mHttpsClient, null, mClockMock)); in testNullParamsInConstructor() 109 .thenReturn(createTestAdSelectionDebugReports(debugReportCount, mClockMock)); in testRunDebugReportSenderSuccess() 136 .thenReturn(createTestAdSelectionDebugReports(debugReportCount, mClockMock)); in testRunDebugReportSenderPartialFailureDoesNotBreakOverallSuccess() 163 .thenReturn(createTestAdSelectionDebugReports(debugReportCounts, mClockMock)); in testRunDebugReportSenderDoesNotFailsOnException() 220 MAX_BATCH_SIZE_FOR_DEBUG_REPORTS, mClockMock)); in testRunDebugReportSenderThrowsTimeout() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/stats/ |
D | EncodingExecutionLogHelperImplTest.java | 49 @Mock private Clock mClockMock; field in EncodingExecutionLogHelperImplTest 59 mAdServicesLoggerMock, mClockMock, mEnrollmentDaoMock); in setUp() 61 when(mClockMock.currentTimeMillis()).thenReturn(100L); in setUp() 146 verify(mClockMock).currentTimeMillis(); in setupEncodingExecutionLog() 151 when(mClockMock.currentTimeMillis()).thenReturn(endTimestamp); in setupEncodingExecutionLog()
|
D | UpdateSignalsProcessReportedLoggerImplTest.java | 56 @Mock private Clock mClockMock; field in UpdateSignalsProcessReportedLoggerImplTest 64 new UpdateSignalsProcessReportedLoggerImpl(mAdServicesLoggerMock, mClockMock); in setUp() 72 when(mClockMock.elapsedRealtime()).thenReturn(TEST_UPDATE_SIGNALS_END_TIME); in testUpdateSignalsProcessReportedStatsLogger_successLogging() 116 when(mClockMock.elapsedRealtime()).thenReturn(TEST_UPDATE_SIGNALS_END_TIME); in testUpdateSignalsProcessReportedStatsLogger_missingUpdateSignalsStartTime() 158 when(mClockMock.elapsedRealtime()).thenReturn(TEST_UPDATE_SIGNALS_END_TIME); in testUpdateSignalsProcessReportedStatsLogger_missingAdservicesApiStatusCode() 201 when(mClockMock.elapsedRealtime()).thenReturn(TEST_UPDATE_SIGNALS_END_TIME); in testUpdateSignalsProcessReportedStatsLogger_missingSignalsWrittenAndValuesCount() 245 when(mClockMock.elapsedRealtime()).thenReturn(TEST_UPDATE_SIGNALS_END_TIME); in testUpdateSignalsProcessReportedStatsLogger_missingKeysStoredCount() 289 when(mClockMock.elapsedRealtime()).thenReturn(TEST_UPDATE_SIGNALS_END_TIME); in testUpdateSignalsProcessReportedStatsLogger_missingEvictionRulesCount() 333 when(mClockMock.elapsedRealtime()).thenReturn(TEST_UPDATE_SIGNALS_END_TIME); in testUpdateSignalsProcessReportedStatsLogger_missingPerBuyerSignalSize() 376 when(mClockMock.elapsedRealtime()).thenReturn(TEST_UPDATE_SIGNALS_END_TIME); in testUpdateSignalsProcessReportedStatsLogger_missingMaxRawProtectedSignalsSizeBytes() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/protectedaudience/src/com/android/adservices/service/adselection/ |
D | CompressedBuyerInputCreatorSellerMaxImplTest.java | 71 @Mock private Clock mClockMock; field in CompressedBuyerInputCreatorSellerMaxImplTest 89 when(mClockMock.millis()).thenReturn(0L).thenReturn(100L); in setup() 98 mClockMock, in setup() 169 verify(mClockMock, times(2)).millis(); in generateCompressedBuyerInputFromDBCAsAndEncodedSignalsReturnsCompressedInputs() 246 verify(mClockMock, times(2)).millis(); in generateCompressedBuyerInputFromDBCAsAndEncodedSignalsReturnsCompressedInputsWithComponentAds() 291 verify(mClockMock, times(2)).millis(); in generateCompressedBuyerInputFromDBCAsAndEncodedSignalsReturnsCompressedInputs_OnlyPAS() 355 verify(mClockMock, times(2)).millis(); in generateCompressedBuyerInputFromDBCAsAndEncodedSignalsReturnsCompressedInputs_OnlyPA() 373 mClockMock, in generateCompressedBuyerInputFromDBCAsAndEncodedSignalsReturnsCompressedInputs_NotEnoughSpaceForPAS() 435 verify(mClockMock, times(2)).millis(); in generateCompressedBuyerInputFromDBCAsAndEncodedSignalsReturnsCompressedInputs_NotEnoughSpaceForPAS() 452 mClockMock, in generateCompressedBuyerInputFromDBCAsAndEncodedSignalsRespectsMaxSize() [all …]
|
D | CompressedBuyerInputCreatorNoOptimizationsTest.java | 65 @Mock private Clock mClockMock; field in CompressedBuyerInputCreatorNoOptimizationsTest 82 when(mClockMock.millis()).thenReturn(0L).thenReturn(100L); in setup() 88 mClockMock, in setup() 152 verify(mClockMock, times(2)).millis(); in generateCompressedBuyerInputFromDBCAsAndEncodedSignalsReturnsCompressedInputs() 221 verify(mClockMock, times(2)).millis(); in generateCompressedBuyerInputFromDBCAsAndEncodedSignalsReturnsCompressedInputsWithComponentAds() 262 verify(mClockMock, times(2)).millis(); in generateCompressedBuyerInputFromDBCAsAndEncodedSignalsReturnsCompressedInputs_OnlyPAS() 319 verify(mClockMock, times(2)).millis(); in generateCompressedBuyerInputFromDBCAsAndEncodedSignalsReturnsCompressedInputs_OnlyPA()
|
D | GetAdSelectionDataRunnerTest.java | 200 @Mock private Clock mClockMock; field in GetAdSelectionDataRunnerTest 255 when(mClockMock.instant()).thenReturn(AD_SELECTION_INITIALIZATION_INSTANT); in setup() 395 when(mClockMock.millis()).thenReturn(0L).thenReturn(100L); in testRunner_getAdSelectionData_WithComponentAdsEnabled() 506 when(mClockMock.millis()).thenReturn(0L).thenReturn(100L); in testRunner_getAdSelectionData_WithComponentAdsDisabled() 618 when(mClockMock.millis()).thenReturn(0L).thenReturn(100L); in testRunner_getAdSelectionData_WithSellerConfigurationSuccessNoOptimizations() 743 when(mClockMock.millis()).thenReturn(0L).thenReturn(100L); in testRunner_getAdSelectionData_WithSellerConfigurationSuccessSellerMaxImpl() 1628 mClockMock, in initRunner()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/protectedaudience/src/com/android/adservices/service/adselection/encryption/ |
D | BackgroundKeyFetchWorkerTest.java | 121 @Mock private Clock mClockMock; field in BackgroundKeyFetchWorkerTest 145 when(mClockMock.instant()).thenReturn(CommonFixture.FIXED_NOW); in setup() 160 mClockMock, in testBackgroundKeyFetchWorker_nullInputs_causeFailure() 170 mClockMock, in testBackgroundKeyFetchWorker_nullInputs_causeFailure() 180 mClockMock, in testBackgroundKeyFetchWorker_nullInputs_causeFailure() 200 mClockMock, in testBackgroundKeyFetchWorker_nullInputs_causeFailure() 390 when(mClockMock.instant()).thenReturn(CommonFixture.FIXED_NOW); in testRunBackgroundKeyFetch_OnEmptyDbAndInAdvanceEnabled_InAdvance_allKeysFetched() 457 mClockMock, in createBackgroundKeyFetchWorker()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/protectedaudience/src/com/android/adservices/service/signals/ |
D | ForcedEncoderImplTest.java | 65 @Mock private Clock mClockMock; field in ForcedEncoderImplTest 70 when(mClockMock.currentTimeMillis()).thenReturn(FIXED_TIME); in setup() 80 mClockMock); in setup()
|
D | SignalsMaintenanceTasksWorkerTest.java | 52 @Mock private Clock mClockMock; field in SignalsMaintenanceTasksWorkerTest 68 mClockMock, in setup() 70 when(mClockMock.instant()).thenReturn(CommonFixture.FIXED_NOW); in setup()
|