Home
last modified time | relevance | path

Searched refs:JavaMockitoHelper (Results 1 – 25 of 27) sorted by relevance

12

/packages/services/Car/tests/carservice_unit_test/src/android/car/test/mocks/
DJavaMockitoHelperTest.java48 private static final long TIMEOUT_MS = Math.max(1_000L, JavaMockitoHelper.ASYNC_TIMEOUT_MS) + 1;
50 private static final String DEFAULT_TIMEOUT_MSG = JavaMockitoHelper.ASYNC_TIMEOUT_MS + "ms";
60 JavaMockitoHelper.await(semaphore, TIMEOUT_MS); in testAwait_Semaphore()
70 JavaMockitoHelper.await(latch, TIMEOUT_MS); in testAwait_CountDownLatch()
79 assertThat(JavaMockitoHelper.silentAwait(latch, 5L)).isFalse(); in testSilentAwait_notCalled()
88 assertThat(JavaMockitoHelper.silentAwait(latch, TIMEOUT_MS)).isTrue(); in testSilentAwait_called()
94 assertThrows(NullPointerException.class, ()->JavaMockitoHelper.getResult(null, "D'OH!")); in testGetResult_nullFuture()
99 assertThrows(NullPointerException.class, ()->JavaMockitoHelper.getResult(mFuture, null)); in testGetResult_nullMessageFormat()
106 assertThat(JavaMockitoHelper.getResult(mFuture, "I am number %d!", 4)).isEqualTo("done"); in testGetResult_ok()
115 () -> JavaMockitoHelper.getResult(mFuture, "I am number %d!", 4)); in testGetResult_timeoutException()
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/systeminterface/
DSystemStateInterfaceTest.java30 import android.car.test.mocks.JavaMockitoHelper;
138 JavaMockitoHelper.await(actionCompleted, /* timeoutMs= */ 1000); in testScheduleActionForBootCompleted()
158 JavaMockitoHelper.await(actionCompleted, /* timeoutMs= */ 1000); in testScheduleActionForBootCompleted_receivedIntent()
173 JavaMockitoHelper.await(actionCompleted, /* timeoutMs= */ 1000); in testScheduleActionForBootCompleted_userUnlocked()
/packages/services/Car/libs/car-test-lib/src/android/car/test/mocks/
DJavaMockitoHelper.java33 public final class JavaMockitoHelper { class
37 private static final String TAG = JavaMockitoHelper.class.getSimpleName();
125 private JavaMockitoHelper() { in JavaMockitoHelper() method in JavaMockitoHelper
DAndroidMockitoHelper.java534 return syncCallOnMainThread(JavaMockitoHelper.ASYNC_TIMEOUT_MS, c); in syncCallOnMainThread()
569 JavaMockitoHelper.await(latch, timeoutMs); in syncCallOnMainThread()
586 syncRunOnUiThread(JavaMockitoHelper.ASYNC_TIMEOUT_MS, activity, runnable); in syncRunOnUiThread()
600 JavaMockitoHelper.await(latch, timeoutMs); in syncRunOnUiThread()
DSyncAnswer.java73 JavaMockitoHelper.await(mLatch, timeoutMs); in await()
DBlockingAnswer.java108 JavaMockitoHelper.silentAwait(mLatch, mTimeoutMs); in answer()
/packages/services/Car/tests/CarLibUnitTest/src/android/car/remoteaccess/
DCarRemoteAccessManagerUnitTest.java44 import android.car.test.mocks.JavaMockitoHelper;
699 JavaMockitoHelper.await(mLatch, DEFAULT_TIMEOUT); in getServiceId()
704 JavaMockitoHelper.await(mLatch, DEFAULT_TIMEOUT); in getVehicleId()
709 JavaMockitoHelper.await(mLatch, DEFAULT_TIMEOUT); in getProcessorId()
714 JavaMockitoHelper.await(mLatch, DEFAULT_TIMEOUT); in getClientId()
719 JavaMockitoHelper.await(mLatch, DEFAULT_TIMEOUT); in getTaskId()
724 JavaMockitoHelper.await(mLatch, DEFAULT_TIMEOUT); in getData()
729 JavaMockitoHelper.await(mLatch, DEFAULT_TIMEOUT); in isRegistrationFail()
734 JavaMockitoHelper.await(mLatch, DEFAULT_TIMEOUT); in isServerlessClientRegistered()
/packages/services/Car/tests/carservice_unit_test/src/android/car/occupantconnection/
DPayloadUnitTest.java23 import android.car.test.mocks.JavaMockitoHelper;
60 JavaMockitoHelper.await(mServiceConnection.latch, DEFAULT_TIMEOUT_MS); in setUp()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/hal/
DMockedPowerHalService.java22 import android.car.test.mocks.JavaMockitoHelper;
198 JavaMockitoHelper.await(mBrightnessSendLatch, timeoutMs); in waitForBrightnessSent()
DUserHalServiceTest.java57 import android.car.test.mocks.JavaMockitoHelper;
1868 JavaMockitoHelper.silentAwait(latch, CALLBACK_TIMEOUT); in replySetPropertyWithOnChangeEvent()
/packages/services/Car/tests/android_car_api_test/src/com/android/car/internal/test/
DLargeParcelableTest.java22 import android.car.test.mocks.JavaMockitoHelper;
62 JavaMockitoHelper.await(mServiceConnection.latch, DEFAULT_TIMEOUT_MS); in setUp()
DLargeParcelableJavaStableAIDLTest.java25 import android.car.test.mocks.JavaMockitoHelper;
77 JavaMockitoHelper.await(mServiceConnection.latch, DEFAULT_TIMEOUT_MS); in setUp()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/oem/
DCarOemProxyServiceHelperTest.java28 import android.car.test.mocks.JavaMockitoHelper;
154 JavaMockitoHelper.await(latch, 1000); //latch would be waiting at max delayFromOemCallMs in testDoBinderCallWithDefaultValueAndDelayedWaitAndCrash()
DCarOemProxyServiceTest.java40 import android.car.test.mocks.JavaMockitoHelper;
238 JavaMockitoHelper.await(latch, 5000); in testCallbackWhenOemServiceIsReady()
/packages/services/Car/libs/car-test-lib/src/android/car/test/util/
DCarAudioManagerTestUtils.java19 import static android.car.test.mocks.JavaMockitoHelper.silentAwait;
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/hardware/power/
DCarPowerManagerUnitTest.java54 import android.car.test.mocks.JavaMockitoHelper;
656 JavaMockitoHelper.await(mLatch, mTimeoutValue); in await()
690 JavaMockitoHelper.await(mLatch, WAIT_TIMEOUT_MS); in await()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/admin/
DNotificationHelperTest.java46 import android.car.test.mocks.JavaMockitoHelper;
154 JavaMockitoHelper.await(cancelLatch, TIMEOUT_MS); in testCancelUserDisclaimerNotification()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/
DExperimentalCarUserManagerUnitTest.java18 import static android.car.test.mocks.JavaMockitoHelper.getResult;
DExperimentalCarUserServiceTest.java21 import static android.car.test.mocks.JavaMockitoHelper.getResult;
DBaseCarUserServiceTestCase.java21 import static android.car.test.mocks.JavaMockitoHelper.getResult;
/packages/services/Car/tests/carservice_test/src/com/android/car/power/
DCarPowerManagementTest.java32 import android.car.test.mocks.JavaMockitoHelper;
992 JavaMockitoHelper.await(mLatch, POLICY_APPLICATION_TIMEOUT_MS); in waitForPowerPolicy()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/evs/
DCarEvsServiceUnitTest.java65 import android.car.test.mocks.JavaMockitoHelper;
1588 JavaMockitoHelper.await(mSemaphore, timeout); in waitFor()
1658 JavaMockitoHelper.await(mEventSemaphore, timeout); in waitForEvent()
1696 JavaMockitoHelper.await(mFrameSemaphore, timeout); in waitForFrames()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/testapi/
DBlockingUserLifecycleListenerTest.java19 import static android.car.test.mocks.JavaMockitoHelper.await;
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/
DAidlVehicleStubUnitTest.java39 import android.car.test.mocks.JavaMockitoHelper;
646 JavaMockitoHelper.await(latch, /* timeoutMs= */ 1000); in testGetAsyncAidlBinderDiedAfterRegisterCallback()
678 JavaMockitoHelper.await(latch, /* timeoutMs= */ 1000); in testGetAsyncAidlBinderDiedWhileRegisterCallback()
/packages/services/Car/tests/carservice_test/src/com/android/car/
DCarDiagnosticManagerTest.java19 import static android.car.test.mocks.JavaMockitoHelper.silentAwait;

12