summaryrefslogtreecommitdiff
path: root/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/AbstractDbIntegrationTest.java
diff options
context:
space:
mode:
authorAbhimanyu <abmehta@google.com>2023-01-09 20:50:22 +0000
committerYaw Frempong <yawfrempong@google.com>2023-01-24 22:54:40 +0000
commit7ea85235691c8cc7e8e9a01f8b46e6ac77e29aa5 (patch)
treeb3eaaece15aa789f780ecbcb6506bf593bc1f769 /adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/AbstractDbIntegrationTest.java
parent655c603e386fb440b6bc330a0fb0e55f7c8255ff (diff)
downloadAdServices-7ea85235691c8cc7e8e9a01f8b46e6ac77e29aa5.tar.gz
Parse XNA related fields
Details: 1. Parses the new header when registering trigger - Attribution-Config 2. Parses new fields adtech_bit_mapping in trigger and serving_adtech_network under aggregate_trigger_data 3. Kept serializing and deserializing logic in relevant classes (AttributionConfig, ServingAdTechNetwork, FilterMap) instead of keeping them in AsyncTriggerFetcher 4. Moved some filter methods to Filter class so that they can be used from other places 5. Relevant validation logic 6. Added async registration ID into source as its registration ID 7. Wired database columns - DAO and SqliteObjectMapper changes Bug: b/264915197 Test: atest AdServicesServiceCoreUnitTests Change-Id: Ib72c651aa3528fd36ecd95500966cd4ff24fc4aa
Diffstat (limited to 'adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/AbstractDbIntegrationTest.java')
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/AbstractDbIntegrationTest.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/AbstractDbIntegrationTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/AbstractDbIntegrationTest.java
index c5032edd4e..f53d291303 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/AbstractDbIntegrationTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/AbstractDbIntegrationTest.java
@@ -326,6 +326,13 @@ public abstract class AbstractDbIntegrationTest {
MeasurementTables.SourceContract.AGGREGATE_CONTRIBUTIONS,
source.getAggregateContributions());
values.put(MeasurementTables.SourceContract.FILTER_DATA, source.getFilterData());
+ values.put(MeasurementTables.SourceContract.DEBUG_REPORTING, source.isDebugReporting());
+ values.put(MeasurementTables.SourceContract.INSTALL_TIME, source.getInstallTime());
+ values.put(MeasurementTables.SourceContract.REGISTRATION_ID, source.getRegistrationId());
+ values.put(
+ MeasurementTables.SourceContract.SHARED_AGGREGATION_KEYS,
+ source.getSharedAggregationKeys());
+
long row = db.insert(MeasurementTables.SourceContract.TABLE, null, values);
if (row == -1) {
throw new SQLiteException("Source insertion failed");
@@ -353,6 +360,12 @@ public abstract class AbstractDbIntegrationTest {
trigger.getRegistrant().toString());
values.put(MeasurementTables.TriggerContract.FILTERS, trigger.getFilters());
values.put(MeasurementTables.TriggerContract.NOT_FILTERS, trigger.getNotFilters());
+ values.put(
+ MeasurementTables.TriggerContract.ATTRIBUTION_CONFIG,
+ trigger.getAttributionConfig());
+ values.put(
+ MeasurementTables.TriggerContract.ADTECH_BIT_MAPPING,
+ trigger.getAdtechBitMapping());
long row = db.insert(MeasurementTables.TriggerContract.TABLE, null, values);
if (row == -1) {
throw new SQLiteException("Trigger insertion failed");