Searched refs:SyncAnswer (Results 1 – 3 of 3) sorted by relevance
35 import android.car.test.mocks.SyncAnswer;78 SyncAnswer<UserInfo> syncUserInfo = mockPreCreateUser(/* isGuest= */ false); in testPreCreatedUsersLessThanRequested()93 SyncAnswer<UserInfo> syncUserInfo = mockPreCreateUser(/* isGuest= */ true); in testPreCreatedGuestsLessThanRequested()108 SyncAnswer<Boolean> syncRemoveStatus = mockRemoveUser(PRE_CREATED_USER_ID); in testRemovePreCreatedUser()122 SyncAnswer<Boolean> syncRemoveStatus = mockRemoveUser(PRE_CREATED_GUEST_ID); in testRemovePreCreatedGuest()136 SyncAnswer<Boolean> syncRemoveStatus = mockRemoveUser(PRE_CREATED_USER_ID); in testRemoveInvalidPreCreatedUser()165 private SyncAnswer<UserInfo> mockPreCreateUserException() { in mockPreCreateUserException()166 SyncAnswer<UserInfo> syncException = SyncAnswer.forException(new Exception()); in mockPreCreateUserException()198 private SyncAnswer<UserInfo> mockPreCreateUser(boolean isGuest) { in mockPreCreateUser()201 SyncAnswer<UserInfo> syncUserInfo = SyncAnswer.forReturn(newUser); in mockPreCreateUser()[all …]
40 public final class SyncAnswer<T> implements Answer<T> { class42 private static final String TAG = SyncAnswer.class.getSimpleName();48 private SyncAnswer(T answer, Throwable exception) { in SyncAnswer() method in SyncAnswer57 public static <T> SyncAnswer<T> forReturn(@NonNull T value) { in forReturn()58 return new SyncAnswer<T>(value, /* exception= */ null); in forReturn()65 public static <T> SyncAnswer<T> forException(@NonNull Throwable t) { in forException()66 return new SyncAnswer<T>(/* value= */ null, t); in forException()
52 SyncAnswer<Boolean> syncException = SyncAnswer.forException(expected); in testForException()64 SyncAnswer<Boolean> syncInitialized = SyncAnswer.forReturn(true); in testForReturn()