/packages/modules/AdServices/adservices/tests/unittest/service-core/appsearch/src/com/android/adservices/service/appsearch/ |
D | AppSearchConsentDaoTest.java | 51 private static final String API_TYPE = "CONSENT-TOPICS"; field in AppSearchConsentDaoTest 86 AppSearchConsentDao dao = new AppSearchConsentDao(ID, ID, NAMESPACE, API_TYPE, CONSENT); in testToString() 94 + API_TYPE in testToString() 103 AppSearchConsentDao dao1 = new AppSearchConsentDao(ID, ID, NAMESPACE, API_TYPE, CONSENT); in testEquals() 104 AppSearchConsentDao dao2 = new AppSearchConsentDao(ID, ID, NAMESPACE, API_TYPE, CONSENT); in testEquals() 105 AppSearchConsentDao dao3 = new AppSearchConsentDao(ID, "foo", NAMESPACE, API_TYPE, CONSENT); in testEquals() 113 String expected = "userId:" + ID + " " + "apiType:" + API_TYPE; in testGetQuery() 114 assertThat(AppSearchConsentDao.getQuery(ID, API_TYPE)).isEqualTo(expected); in testGetQuery() 119 String expected = ID + "_" + API_TYPE; in testGetRowId() 120 assertThat(AppSearchConsentDao.getRowId(ID, API_TYPE)).isEqualTo(expected); in testGetRowId() [all …]
|
D | AppSearchDaoTest.java | 84 private static final String API_TYPE = "CONSENT-TOPICS"; field in AppSearchDaoTest 129 AppSearchConsentDao dao = new AppSearchConsentDao(ID, ID, NAMESPACE, API_TYPE, CONSENT); in testIterateSearchResults() 136 .setPropertyString("apiType", API_TYPE) in testIterateSearchResults() 201 AppSearchConsentDao dao = new AppSearchConsentDao(ID, ID, NAMESPACE, API_TYPE, CONSENT); in testReadConsentData() 206 .setPropertyString("apiType", API_TYPE) in testReadConsentData() 274 AppSearchConsentDao dao = new AppSearchConsentDao(ID, ID, NAMESPACE, API_TYPE, CONSENT); in testReadAppSearchData() 279 .setPropertyString("apiType", API_TYPE) in testReadAppSearchData() 316 AppSearchConsentDao dao = new AppSearchConsentDao(ID, ID, NAMESPACE, API_TYPE, CONSENT); in testWriteConsentData_failure() 354 AppSearchConsentDao dao = new AppSearchConsentDao(ID, ID, NAMESPACE, API_TYPE, CONSENT); in testWriteConsentData() 380 AppSearchConsentDao dao = new AppSearchConsentDao(ID, ID, NAMESPACE, API_TYPE, CONSENT); in testWriteConsentData_timeout()
|
D | AppSearchConsentManagerTest.java | 73 private static final String API_TYPE = AdServicesApiType.TOPICS.toPpApiDatastoreKey(); field in AppSearchConsentManagerTest 106 when(mAppSearchConsentWorker.getConsent(API_TYPE)).thenReturn(false); in testGetConsent() 107 assertThat(mAppSearchConsentManager.getConsent(API_TYPE)).isEqualTo(false); in testGetConsent() 109 when(mAppSearchConsentWorker.getConsent(API_TYPE)).thenReturn(true); in testGetConsent() 110 assertThat(mAppSearchConsentManager.getConsent(API_TYPE)).isEqualTo(true); in testGetConsent() 115 mAppSearchConsentManager.setConsent(API_TYPE, true); in testSetConsent() 116 verify(mAppSearchConsentWorker).setConsent(API_TYPE, true); in testSetConsent() 118 mAppSearchConsentManager.setConsent(API_TYPE, false); in testSetConsent() 119 verify(mAppSearchConsentWorker).setConsent(API_TYPE, false); in testSetConsent()
|
D | AppSearchConsentStorageManagerTest.java | 82 private static final AdServicesApiType API_TYPE = AdServicesApiType.TOPICS; field in AppSearchConsentStorageManagerTest 108 when(mAppSearchConsentWorker.getConsent(API_TYPE.toPpApiDatastoreKey())).thenReturn(false); in testGetConsent() 109 expect.that(mAppSearchConsentStorageManager.getConsent(API_TYPE).isGiven()).isFalse(); in testGetConsent() 111 when(mAppSearchConsentWorker.getConsent(API_TYPE.toPpApiDatastoreKey())).thenReturn(true); in testGetConsent() 112 expect.that(mAppSearchConsentStorageManager.getConsent(API_TYPE).isGiven()).isTrue(); in testGetConsent() 117 mAppSearchConsentStorageManager.setConsent(API_TYPE, true); in testSetConsent() 118 verify(mAppSearchConsentWorker).setConsent(API_TYPE.toPpApiDatastoreKey(), true); in testSetConsent() 120 mAppSearchConsentStorageManager.setConsent(API_TYPE, false); in testSetConsent() 121 verify(mAppSearchConsentWorker).setConsent(API_TYPE.toPpApiDatastoreKey(), false); in testSetConsent()
|
D | AppSearchConsentWorkerTest.java | 82 private static final String API_TYPE = AdServicesApiType.TOPICS.toPpApiDatastoreKey(); field in AppSearchConsentWorkerTest 116 eq(API_TYPE), in testGetConsent() 119 boolean result = AppSearchConsentWorker.getInstance().getConsent(API_TYPE); in testGetConsent() 130 eq(API_TYPE), in testGetConsent() 133 boolean result2 = AppSearchConsentWorker.getInstance().getConsent(API_TYPE); in testGetConsent() 145 () -> AppSearchConsentWorker.getInstance().setConsent(API_TYPE, CONSENTED)); in testSetConsent_failure() 158 () -> AppSearchConsentWorker.getInstance().setConsent(API_TYPE, CONSENTED)); in testSetConsent_failure_timeout() 171 AppSearchConsentWorker.getInstance().setConsent(API_TYPE, CONSENTED); in testSetConsent()
|