Home
last modified time | relevance | path

Searched refs:mMeasurementDao (Results 1 – 10 of 10) sorted by relevance

/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/attribution/
DAttributionJobHandlerTest.java162 IMeasurementDao mMeasurementDao; field in AttributionJobHandlerTest
186 return mMeasurementDao; in getMeasurementDao()
246 when(mMeasurementDao.getPendingTriggerIds()) in shouldIgnoreNonPendingTrigger()
248 when(mMeasurementDao.getTrigger(trigger.getId())).thenReturn(trigger); in shouldIgnoreNonPendingTrigger()
250 verify(mMeasurementDao).getTrigger(trigger.getId()); in shouldIgnoreNonPendingTrigger()
251 verify(mMeasurementDao, never()).updateTriggerStatus(any(), anyInt()); in shouldIgnoreNonPendingTrigger()
252 verify(mMeasurementDao, never()).insertEventReport(any()); in shouldIgnoreNonPendingTrigger()
260 when(mMeasurementDao.getPendingTriggerIds()) in shouldIgnoreIfNoSourcesFound()
262 when(mMeasurementDao.getTrigger(trigger.getId())).thenReturn(trigger); in shouldIgnoreIfNoSourcesFound()
263 when(mMeasurementDao.getMatchingActiveSources(trigger)).thenReturn(new ArrayList<>()); in shouldIgnoreIfNoSourcesFound()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/
DDebugReportApiTest.java84 @Mock private IMeasurementDao mMeasurementDao; field in DebugReportApiTest
133 mDebugReportApi.scheduleSourceSuccessDebugReport(source, mMeasurementDao, Map.of()); in testScheduleAppToAppSourceSuccessDebugReport_success()
135 verify(mMeasurementDao, times(1)).insertDebugReport(captor.capture()); in testScheduleAppToAppSourceSuccessDebugReport_success()
160 mDebugReportApi.scheduleSourceSuccessDebugReport(source, mMeasurementDao, Map.of()); in testScheduleWebToWebSourceSuccessDebugReport_success()
162 verify(mMeasurementDao, times(1)).insertDebugReport(captor.capture()); in testScheduleWebToWebSourceSuccessDebugReport_success()
187 mDebugReportApi.scheduleSourceSuccessDebugReport(source, mMeasurementDao, Map.of()); in testScheduleAppToWebSourceSuccessDebugReport_success()
189 verify(mMeasurementDao, times(1)).insertDebugReport(captor.capture()); in testScheduleAppToWebSourceSuccessDebugReport_success()
216 mDebugReportApi.scheduleSourceSuccessDebugReport(source, mMeasurementDao, Map.of()); in testScheduleWebToAppSourceSuccessDebugReport_success()
218 verify(mMeasurementDao, times(1)).insertDebugReport(captor.capture()); in testScheduleWebToAppSourceSuccessDebugReport_success()
245 mDebugReportApi.scheduleSourceSuccessDebugReport(source, mMeasurementDao, Map.of()); in testScheduleAppToAppAndWebSourceSuccessDebugReport_success()
[all …]
DAggregateReportingJobHandlerTest.java112 @Mock IMeasurementDao mMeasurementDao; field in AggregateReportingJobHandlerTest
145 return mMeasurementDao; in getMeasurementDao()
215 when(mMeasurementDao.getAggregateReport(aggregateReport.getId())) in testSendReportForPendingReportSuccess()
225 .when(mMeasurementDao) in testSendReportForPendingReportSuccess()
235 verify(mMeasurementDao, times(1)).markAggregateReportStatus(any(), anyInt()); in testSendReportForPendingReportSuccess()
269 when(mMeasurementDao.getAggregateReport(aggregateReport.getId())) in testSendReportSuccess_reinstallAttributionEnabled_persistsAppReportHistory()
271 when(mMeasurementDao.getSourceDestinations(aggregateReport.getSourceId())) in testSendReportSuccess_reinstallAttributionEnabled_persistsAppReportHistory()
273 when(mMeasurementDao.getSource(aggregateReport.getSourceId())).thenReturn(source); in testSendReportSuccess_reinstallAttributionEnabled_persistsAppReportHistory()
282 .when(mMeasurementDao) in testSendReportSuccess_reinstallAttributionEnabled_persistsAppReportHistory()
292 verify(mMeasurementDao, times(1)).markAggregateReportStatus(any(), anyInt()); in testSendReportSuccess_reinstallAttributionEnabled_persistsAppReportHistory()
[all …]
DEventReportingJobHandlerTest.java99 @Mock IMeasurementDao mMeasurementDao; field in EventReportingJobHandlerTest
133 return mMeasurementDao; in getMeasurementDao()
148 when(mMeasurementDao.getSourceRegistrant(any())).thenReturn(SOURCE_REGISTRANT); in setUp()
196 when(mMeasurementDao.getEventReport(eventReport.getId())).thenReturn(eventReport); in testSendReportForPendingReportSuccess()
205 .when(mMeasurementDao) in testSendReportForPendingReportSuccess()
213 verify(mMeasurementDao, times(1)).markEventReportStatus(any(), anyInt()); in testSendReportForPendingReportSuccess()
242 when(mMeasurementDao.getEventReport(eventReport.getId())).thenReturn(eventReport); in testSendReportForPendingDebugReportSuccess()
250 doNothing().when(mMeasurementDao).markEventDebugReportDelivered(eventReport.getId()); in testSendReportForPendingDebugReportSuccess()
257 verify(mMeasurementDao, times(1)).markEventDebugReportDelivered(any()); in testSendReportForPendingDebugReportSuccess()
303 when(mMeasurementDao.getEventReport(eventReport.getId())).thenReturn(eventReport); in testSendReportSuccess_reinstallAttributionEnabled_persistsAppReportHistory()
[all …]
DDebugReportingJobHandlerTest.java82 @Mock private IMeasurementDao mMeasurementDao; field in DebugReportingJobHandlerTest
113 return mMeasurementDao; in getMeasurementDao()
140 when(mMeasurementDao.getDebugReport(debugReport.getId())).thenReturn(debugReport); in testSendDebugReportForSuccess()
148 doNothing().when(mMeasurementDao).deleteDebugReport(debugReport.getId()); in testSendDebugReportForSuccess()
155 verify(mMeasurementDao, times(1)).deleteDebugReport(any()); in testSendDebugReportForSuccess()
166 when(mMeasurementDao.getDebugReport(debugReport.getId())).thenReturn(debugReport); in testSendDebugReportForFailure()
179 verify(mMeasurementDao, never()).deleteDebugReport(any()); in testSendDebugReportForFailure()
194 when(mMeasurementDao.getDebugReportIds()) in testPerformScheduledReportsForMultipleReports()
196 when(mMeasurementDao.getDebugReport(debugReport1.getId())).thenReturn(debugReport1); in testPerformScheduledReportsForMultipleReports()
197 when(mMeasurementDao.getDebugReport(debugReport2.getId())).thenReturn(debugReport2); in testPerformScheduledReportsForMultipleReports()
[all …]
DReportingJobServiceTest.java96 @Mock private IMeasurementDao mMeasurementDao; field in ReportingJobServiceTest
131 return mMeasurementDao; in getMeasurementDao()
182 when(mMeasurementDao.getLatestReportTimeInBatchWindow( in scheduleIfNeeded_nextReportInFuture_noPendingJobs_schedule()
212 when(mMeasurementDao.getLatestReportTimeInBatchWindow( in scheduleIfNeeded_nextReportInFuture_onePendingJob_reschedule()
252 when(mMeasurementDao.getLatestReportTimeInBatchWindow( in scheduleIfNeeded_nextReportInFuture_onePendingJobWithSameTime_dontReschedule()
263 when(mMeasurementDao.getKeyValueData( in scheduleIfNeeded_nextReportInFuture_onePendingJobWithSameTime_dontReschedule()
298 when(mMeasurementDao.getLatestReportTimeInBatchWindow( in scheduleIfNeeded_nextReportInMinExecutionWindow_schedule()
328 when(mMeasurementDao.getLatestReportTimeInBatchWindow( in scheduleIfNeeded_nextReportInPast_noPendingJob_schedule()
362 when(mMeasurementDao.getLatestReportTimeInBatchWindow( in scheduleIfNeeded_nextReportInMinExecutionWindow_noPendingJob_forceSchedule_schedule()
403 when(mMeasurementDao.getLatestReportTimeInBatchWindow( in scheduleIfNeeded_modifyFlags_jobInfoIsModified()
[all …]
DDebugKeyAccessorTest.java80 @Mock private IMeasurementDao mMeasurementDao; field in DebugKeyAccessorTest
85 mDebugKeyAccessor = new DebugKeyAccessor(mFlags, mAdServicesLogger, mMeasurementDao); in setup()
1617 when(mMeasurementDao.countDistinctDebugAdIdsUsedByEnrollment(any())).thenReturn(1L); in getDebugKeys_adIdMatching_appToWeb_nullPlatformAdId_debugKeysAbsent_logsMetric()
1658 when(mMeasurementDao.countDistinctDebugAdIdsUsedByEnrollment(any())).thenReturn(1L); in getDebugKeys_adIdMatching_appToWeb_matchingAdIds_debugKeysPresent()
1699 when(mMeasurementDao.countDistinctDebugAdIdsUsedByEnrollment(any())).thenReturn(1L); in getDebugKeys_encryptedAdIdMatching_appToWeb_matchingAdIds_debugKeysPresent()
1740 when(mMeasurementDao.countDistinctDebugAdIdsUsedByEnrollment(any())).thenReturn(2L); in getDebugKeys_adIdMatching_appToWeb_nonMatchingAdIds_debugKeysAbsent()
1781 when(mMeasurementDao.countDistinctDebugAdIdsUsedByEnrollment(any())).thenReturn(1L); in getDebugKeys_adIdMatching_appToWeb_failedMatch_doesNotMatchJoinKeys()
1888 when(mMeasurementDao.countDistinctDebugAdIdsUsedByEnrollment(any())) in getDebugKeys_adIdMatching_appToWeb_uniqueAdIdLimitReached_debugKeysAbsent()
1959 when(mMeasurementDao.countDistinctDebugAdIdsUsedByEnrollment(any())).thenReturn(1L); in getDebugKeys_adIdMatching_webToApp_nullPlatformAdId_debugKeysAbsent_logsMetric()
2000 when(mMeasurementDao.countDistinctDebugAdIdsUsedByEnrollment(any())).thenReturn(1L); in getDebugKeys_adIdMatching_webToApp_matchingAdIds_debugKeysPresent()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/
DAsyncRegistrationQueueRunnerTest.java196 @Mock private IMeasurementDao mMeasurementDao; field in AsyncRegistrationQueueRunnerTest
227 return mMeasurementDao; in getMeasurementDao()
309 when(mMeasurementDao.insertSource(any())).thenReturn(DEFAULT_SOURCE_ID); in before()
342 when(mMeasurementDao.fetchNextQueuedAsyncRegistration(anyInt(), any())) in test_runAsyncRegistrationQueueWorker_appSource_success()
346 when(mMeasurementDao.getKeyValueData(anyString(), any())).thenReturn(redirectCount); in test_runAsyncRegistrationQueueWorker_appSource_success()
355 verify(mMeasurementDao, times(1)).insertSource(any(Source.class)); in test_runAsyncRegistrationQueueWorker_appSource_success()
356 verify(mMeasurementDao, times(2)).insertAsyncRegistration(any(AsyncRegistration.class)); in test_runAsyncRegistrationQueueWorker_appSource_success()
361 verify(mMeasurementDao, times(1)).insertOrUpdateKeyValueData(redirectCountCaptor.capture()); in test_runAsyncRegistrationQueueWorker_appSource_success()
363 verify(mMeasurementDao, times(1)).deleteAsyncRegistration(any(String.class)); in test_runAsyncRegistrationQueueWorker_appSource_success()
394 when(mMeasurementDao.fetchNextQueuedAsyncRegistration(anyInt(), any())) in test_runAsyncRegistrationQueueWorker_emptyNoisedState_sendsDebugReport()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/deletion/
DMeasurementDataDeleterTest.java143 @Mock private IMeasurementDao mMeasurementDao; field in MeasurementDataDeleterTest
180 return mMeasurementDao; in getMeasurementDao()
216 when(mMeasurementDao.getSource(source1.getId())).thenReturn(source1); in resetAggregateContributions_hasMatchingReports_resetsContributions()
217 when(mMeasurementDao.getSource(source2.getId())).thenReturn(source2); in resetAggregateContributions_hasMatchingReports_resetsContributions()
221 mMeasurementDao, Arrays.asList(AGGREGATE_REPORT_1, AGGREGATE_REPORT_2)); in resetAggregateContributions_hasMatchingReports_resetsContributions()
225 verify(mMeasurementDao, times(2)) in resetAggregateContributions_hasMatchingReports_resetsContributions()
247 when(mMeasurementDao.getSource(source1.getId())).thenReturn(source1); in resetAggregateContributions_withSourceContributionsGoingBelowZero_resetsToZero()
251 mMeasurementDao, Collections.singletonList(AGGREGATE_REPORT_1)); in resetAggregateContributions_withSourceContributionsGoingBelowZero_resetsToZero()
255 verify(mMeasurementDao, times(1)) in resetAggregateContributions_withSourceContributionsGoingBelowZero_resetsToZero()
294 when(mMeasurementDao.getSource(source1.getId())).thenReturn(source1); in resetDedupKeys_matchingReports_removesDedupKeysFromSource()
[all …]
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/reporting/
DDebugKeyAccessor.java55 @NonNull private final IMeasurementDao mMeasurementDao; field in DebugKeyAccessor
68 mMeasurementDao = measurementDao; in DebugKeyAccessor()
467 long numUnique = mMeasurementDao.countDistinctDebugAdIdsUsedByEnrollment(enrollmentId); in isEnrollmentIdWithinUniqueAdIdLimit()
472 return mMeasurementDao.countDistinctDebugAdIdsUsedByEnrollment(enrollmentId); in getNumUniqueAdIdsUsed()