Home
last modified time | relevance | path

Searched refs:AnswerSyncCallback (Results 1 – 6 of 6) sorted by relevance

/packages/modules/AdServices/shared/libraries/device-side/java/com/android/adservices/shared/testing/
DAnswerSyncCallback.java34 public final class AnswerSyncCallback<T> extends DeviceSideSyncCallback implements Answer<T> { class
36 private static final String TAG = AnswerSyncCallback.class.getSimpleName();
41 private AnswerSyncCallback(T answer, Throwable failure, int numberOfExpectedCalls) { in AnswerSyncCallback() method in AnswerSyncCallback
50 private AnswerSyncCallback(T answer, Throwable failure, SyncCallbackSettings settings) { in AnswerSyncCallback() method in AnswerSyncCallback
60 public static AnswerSyncCallback<Void> forSingleVoidAnswer() { in forSingleVoidAnswer()
61 return new AnswerSyncCallback<Void>( in forSingleVoidAnswer()
69 public static <A> AnswerSyncCallback<A> forSingleAnswer(A answer) { in forSingleAnswer()
70 return new AnswerSyncCallback<A>( in forSingleAnswer()
78 public static AnswerSyncCallback<Void> forMultipleVoidAnswers(int numberOfExpectedCalls) { in forMultipleVoidAnswers()
79 return new AnswerSyncCallback<>( in forMultipleVoidAnswers()
[all …]
/packages/modules/AdServices/shared/tests/device-side/java/com/android/adservices/shared/testing/
DAnswerSyncCallbackTest.java37 public final class AnswerSyncCallbackTest extends SyncCallbackTestCase<AnswerSyncCallback<Void>> {
51 protected AnswerSyncCallback<Void> newCallback(SyncCallbackSettings settings) { in newCallback()
52 return AnswerSyncCallback.forVoidAnswers(settings); in newCallback()
56 protected String callCallback(AnswerSyncCallback<Void> callback) { in callCallback()
78 AnswerSyncCallback<Void> callback = AnswerSyncCallback.forSingleVoidAnswer(); in testForSingleVoidAnswer()
90 AnswerSyncCallback<String> callback = AnswerSyncCallback.forSingleAnswer(ANSWER); in testForSingleAnswer()
108 forTwoVoidAnswers(AnswerSyncCallback.forMultipleVoidAnswers(2)); in testForMultipleVoidAnswers()
113 forTwoVoidAnswers(AnswerSyncCallback.forVoidAnswers(mSettingsForTwoCalls)); in testForVoidAnswers()
116 private void forTwoVoidAnswers(AnswerSyncCallback<Void> callback) throws Exception { in forTwoVoidAnswers()
138 forTwoAnswersTest(AnswerSyncCallback.forMultipleAnswers(ANSWER, 2)); in testForMultipleAnswers()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/adselection/
DReportAndRegisterEventFallbackImplTest.java93 import com.android.adservices.shared.testing.AnswerSyncCallback;
338 AnswerSyncCallback<Void> sellerCallback = in testImplDoesNotCrashAfterSellerReportingThrowsAnException()
340 AnswerSyncCallback<Void> buyerCallback = in testImplDoesNotCrashAfterSellerReportingThrowsAnException()
391 AnswerSyncCallback<Void> sellerCallback = in testImplDoesNotCrashAfterSellerReportingAndRegisteringThrowsAnException()
392 AnswerSyncCallback.forSingleFailure(Void.class, mRuntimeException); in testImplDoesNotCrashAfterSellerReportingAndRegisteringThrowsAnException()
396 AnswerSyncCallback<Void> buyerCallback = in testImplDoesNotCrashAfterSellerReportingAndRegisteringThrowsAnException()
459 AnswerSyncCallback<Void> sellerCallback = in testImplDoesNotCrashAfterBuyerReportingThrowsAnException()
461 AnswerSyncCallback<Void> buyerCallback = in testImplDoesNotCrashAfterBuyerReportingThrowsAnException()
512 AnswerSyncCallback<Void> sellerCallback = in testImplDoesNotCrashAfterBuyerReportingAndRegisteringThrowsAnException()
514 AnswerSyncCallback<Void> buyerCallback = in testImplDoesNotCrashAfterBuyerReportingAndRegisteringThrowsAnException()
[all …]
DReportAndRegisterEventImplTest.java93 import com.android.adservices.shared.testing.AnswerSyncCallback;
295 AnswerSyncCallback<Void> sellerCallback = in testImplDoesNotCrashAfterSellerReportingThrowsAnException()
296 AnswerSyncCallback.forSingleFailure(Void.class, mRuntimeException); in testImplDoesNotCrashAfterSellerReportingThrowsAnException()
300 AnswerSyncCallback<Void> buyerCallback = in testImplDoesNotCrashAfterSellerReportingThrowsAnException()
335 AnswerSyncCallback<Void> sellerCallback = in testImplDoesNotCrashAfterBuyerReportingThrowsAnException()
337 AnswerSyncCallback<Void> buyerCallback = in testImplDoesNotCrashAfterBuyerReportingThrowsAnException()
338 AnswerSyncCallback.forSingleFailure(Void.class, mRuntimeException); in testImplDoesNotCrashAfterBuyerReportingThrowsAnException()
1229 AnswerSyncCallback<Void> countDownAnswer = AnswerSyncCallback.forVoidAnswers(settings); in callReportEvent()
1243 private AnswerSyncCallback<Void> syncRegisterEvent(String path, ReportInteractionInput input) { in syncRegisterEvent()
1244 AnswerSyncCallback<Void> callback = AnswerSyncCallback.forSingleVoidAnswer(); in syncRegisterEvent()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/customaudience/
DBackgroundFetchWorkerTest.java69 import com.android.adservices.shared.testing.AnswerSyncCallback;
665 AnswerSyncCallback<FluentFuture<UpdateResultType>> updateCustomAudienceCallback =
666 AnswerSyncCallback.forMultipleAnswers(
684 AnswerSyncCallback<Void> loggerCloseCallback =
685 AnswerSyncCallback.forMultipleVoidAnswers(/* numberOfExpectedCalls= */ 2);
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/stats/
DAdServicesLoggerImplTest.java141 import com.android.adservices.shared.testing.AnswerSyncCallback;
185 AnswerSyncCallback<Void> callback = AnswerSyncCallback.forSingleVoidAnswer(); in testLogFledgeApiCallStatsWithAppPackageNameLogging()
483 AnswerSyncCallback<Void> callback = AnswerSyncCallback.forSingleVoidAnswer(); in testLogApiCallStats()
552 AnswerSyncCallback<Void> callback = AnswerSyncCallback.forSingleVoidAnswer(); in testLogMsmtRegistrationResponseSize()