Home
last modified time | relevance | path

Searched refs:ThrowingRunnable (Results 1 – 25 of 39) sorted by relevance

12

/packages/modules/Connectivity/staticlibs/testutils/hostdevice/com/android/testutils/
DCleanup.kt21 import com.android.testutils.FunctionalUtils.ThrowingRunnable in <lambda>()
118 fun <T> testAndCleanup(tryBlock: ThrowingSupplier<T>, vararg cleanupBlock: ThrowingRunnable): T { in cleanup()
123 fun testAndCleanup(tryBlock: ThrowingRunnable, vararg cleanupBlock: ThrowingRunnable) { in testAndCleanup()
DFunctionalUtils.java49 public interface ThrowingRunnable { interface in FunctionalUtils
74 public static Runnable ignoreExceptions(ThrowingRunnable r) {
DMiscAsserts.kt21 import com.android.testutils.FunctionalUtils.ThrowingRunnable in <lambda>()
49 fun <T : Exception> assertThrows(expected: Class<T>, block: ThrowingRunnable): T { in assertThrows()
53 fun <T : Exception> assertThrows(msg: String, expected: Class<T>, block: ThrowingRunnable): T { in assertThrows()
/packages/modules/Connectivity/tests/unit/java/com/android/server/
DNetIdManagerTest.kt24 import com.android.testutils.FunctionalUtils.ThrowingRunnable
48 assertThrows(IllegalStateException::class.java, ThrowingRunnable { manager.reserveNetId() }) in testReserveReleaseNetId()
51 assertThrows(IllegalStateException::class.java, ThrowingRunnable { manager.reserveNetId() }) in testReserveReleaseNetId()
/packages/modules/DeviceLock/tests/unittests/src/com/android/server/devicelock/
DTestUtils.java19 import org.junit.function.ThrowingRunnable;
31 static void eventually(ThrowingRunnable r, long timeoutMillis) { in eventually()
/packages/modules/Permission/tests/cts/permission/permissionTestUtilLib/src/android/permission/cts/
DTestUtils.java44 public interface ThrowingRunnable { interface in TestUtils
55 public static void ensure(@NonNull ThrowingRunnable r, long timeout) throws Throwable { in ensure()
95 public static void eventually(@NonNull ThrowingRunnable r, long timeout) throws Throwable { in eventually()
/packages/modules/Connectivity/staticlibs/testutils/devicetests/com/android/testutils/
DDeviceConfigRule.kt24 import com.android.testutils.FunctionalUtils.ThrowingRunnable in <lambda>()
58 private val currentTestCleanupActions = mutableListOf<ThrowingRunnable>() in <lambda>()
173 fun runAfterNextCleanup(action: ThrowingRunnable) { in <lambda>()
DTestPermissionUtil.kt23 import com.android.testutils.FunctionalUtils.ThrowingRunnable
81 runnable: ThrowingRunnable in runAsShell()
DHandlerUtils.kt25 import com.android.testutils.FunctionalUtils.ThrowingRunnable
88 inline fun visibleOnHandlerThread(handler: Handler, r: ThrowingRunnable){ in visibleOnHandlerThread()
/packages/modules/Connectivity/staticlibs/framework/com/android/net/module/util/
DBinderUtils.java42 @NonNull ThrowingRunnable<T> action) throws T { in withCleanCallingIdentity()
57 public interface ThrowingRunnable<T extends Exception> { interface in BinderUtils
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/adselection/
DAuctionServerDataCompressorFactoryTest.java26 import org.junit.function.ThrowingRunnable;
44 ThrowingRunnable runnable = in testFactory_invalidVersion_throwsExceptionFailure()
/packages/modules/GeoTZ/s2storage/src/testing/java/com/android/storage/testing/
DMoreAsserts.java24 public interface ThrowingRunnable { interface in MoreAsserts
33 ThrowingRunnable runnable) { in assertThrows()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/internal/util/
DFunctionUtilsTest.java30 import com.android.car.internal.util.FunctionalUtils.ThrowingRunnable;
76 ThrowingRunnable tr = () -> { in testUncheckedExceptionsThrowningRunnable()
141 ThrowingRunnable tr = () -> { in testHandleExceptions()
/packages/modules/Connectivity/tests/cts/hostside-network-policy/app/src/com/android/cts/netpolicy/hostside/
DMeterednessConfigurationRule.java25 import com.android.compatibility.common.util.ThrowingRunnable;
31 private ThrowingRunnable mMeterednessResetter;
DConnOnActivityStartTest.java37 import com.android.compatibility.common.util.ThrowingRunnable;
117 ThrowingRunnable onBeginIteration) throws Exception { in assertLaunchedActivityHasNetworkAccess()
DNetworkPolicyTestUtils.java66 import com.android.compatibility.common.util.ThrowingRunnable;
192 public static ThrowingRunnable setupActiveNetworkMeteredness(boolean metered) throws Exception { in setupActiveNetworkMeteredness()
/packages/services/Car/car-lib/src/com/android/car/internal/util/
DFunctionalUtils.java55 public static Runnable uncheckExceptions(ThrowingRunnable action) { in uncheckExceptions()
84 public static Runnable handleExceptions(ThrowingRunnable r, Consumer<Throwable> handler) { in handleExceptions()
102 public interface ThrowingRunnable extends Runnable {
/packages/modules/AdServices/shared/tests/device-side/java/com/android/adservices/mockito/
DAndroidExtendedMockitoMockerTest.java28 import org.junit.function.ThrowingRunnable;
63 private void assertFailsWhenClassNotSpied(Class<?> clazz, ThrowingRunnable r) { in assertFailsWhenClassNotSpied()
/packages/modules/NetworkStack/common/networkstackclient/src/android/net/
DIpMemoryStoreClient.java55 private interface ThrowingRunnable { interface in IpMemoryStoreClient
59 private void ignoringRemoteException(ThrowingRunnable r) { in ignoringRemoteException()
63 private void ignoringRemoteException(String message, ThrowingRunnable r) { in ignoringRemoteException()
/packages/modules/AdServices/adservices/tests/perf/src/android/adservices/test/scenario/adservices/fledge/
DFledgeAppNotAllowedMemoryTest.java29 import org.junit.function.ThrowingRunnable;
107 ThrowingRunnable runnable, Class<? extends Throwable> throwable) throws Throwable { in assertThrowIfPresent()
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DTestNetworkRunnable.java34 import com.android.compatibility.common.util.ThrowingRunnable;
40 public class TestNetworkRunnable implements ThrowingRunnable {
/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/
DNoWallpaperPermissionsTest.java33 import org.junit.function.ThrowingRunnable;
187 private void assertSecurityException(ThrowingRunnable runnable, String errorMessage) { in assertSecurityException()
DPermissionGroupChange.java83 private void eventually(ThrowingRunnable runnable, long timeoutSec) throws Throwable { in eventually()
204 private interface ThrowingRunnable { interface in PermissionGroupChange
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/js/
DJavaScriptSandboxProviderTest.java50 import org.junit.function.ThrowingRunnable;
92 ThrowingRunnable getFutureInstance = in testJsSandboxProviderCreateFailsIfSandboxNotSupported()
/packages/modules/HealthFitness/tests/cts/utils/HealthConnectTestUtils/src/android/healthconnect/cts/utils/
DPermissionHelper.java37 import com.android.compatibility.common.util.ThrowingRunnable;
220 String packageName, String permission, ThrowingRunnable runnable) throws Exception { in runWithRevokedPermissions()

12