Home
last modified time | relevance | path

Searched refs:assertThrows (Results 1 – 25 of 196) sorted by relevance

12345678

/cts/tests/autofillservice/src/android/autofillservice/cts/unittests/
DFillResponseTest.java24 import static org.testng.Assert.assertThrows;
64 assertThrows(IllegalArgumentException.class, in testBuilder_setAuthentication_invalid()
67 assertThrows(IllegalArgumentException.class, in testBuilder_setAuthentication_invalid()
71 assertThrows(IllegalArgumentException.class, in testBuilder_setAuthentication_invalid()
75 assertThrows(IllegalArgumentException.class, in testBuilder_setAuthentication_invalid()
78 assertThrows(IllegalArgumentException.class, in testBuilder_setAuthentication_invalid()
90 assertThrows(IllegalStateException.class, in testBuilder_setAuthentication_illegalState()
93 assertThrows(IllegalStateException.class, in testBuilder_setAuthentication_illegalState()
100 assertThrows(NullPointerException.class, () -> new FillResponse.Builder().setHeader(null)); in testBuilder_setHeaderOrFooterInvalid()
101 assertThrows(NullPointerException.class, () -> new FillResponse.Builder().setFooter(null)); in testBuilder_setHeaderOrFooterInvalid()
[all …]
DUserDataTest.java29 import static org.testng.Assert.assertThrows;
95 assertThrows(NullPointerException.class, in testBuilder_invalid()
97 assertThrows(IllegalArgumentException.class, in testBuilder_invalid()
99 assertThrows(NullPointerException.class, in testBuilder_invalid()
101 assertThrows(IllegalArgumentException.class, in testBuilder_invalid()
103 assertThrows(IllegalArgumentException.class, in testBuilder_invalid()
105 assertThrows(IllegalArgumentException.class, in testBuilder_invalid()
107 assertThrows(NullPointerException.class, () -> new UserData.Builder(mId, mValue, null)); in testBuilder_invalid()
108 assertThrows(IllegalArgumentException.class, () -> new UserData.Builder(mId, mValue, "")); in testBuilder_invalid()
113 assertThrows(NullPointerException.class, () -> mBuilder.add(null, mCategoryId)); in testAdd_invalid()
[all …]
DSaveInfoTest.java26 import static org.testng.Assert.assertThrows;
49 assertThrows(IllegalArgumentException.class, in testRequiredIdsBuilder_null()
55 assertThrows(IllegalArgumentException.class, in testRequiredIdsBuilder_empty()
61 assertThrows(IllegalArgumentException.class, in testRequiredIdsBuilder_nullEntry()
69 assertThrows(IllegalStateException.class, ()-> builder.build()); in testBuild_noOptionalIds()
76 assertThrows(IllegalArgumentException.class, ()-> builder.setOptionalIds(null)); in testSetOptionalIds_null()
83 assertThrows(IllegalArgumentException.class, in testSetOptional_empty()
91 assertThrows(IllegalArgumentException.class, in testSetOptional_nullEntry()
100 assertThrows(IllegalArgumentException.class, in testAddSanitizer_illegalArgs()
103 assertThrows(IllegalArgumentException.class, in testAddSanitizer_illegalArgs()
[all …]
DCustomDescriptionUnitTest.java22 import static org.testng.Assert.assertThrows;
55 assertThrows(NullPointerException.class, () -> new CustomDescription.Builder(null)); in testNullConstructor()
60 assertThrows(IllegalArgumentException.class, () -> mBuilder.addChild(42, null)); in testAddChild_null()
65 assertThrows(IllegalArgumentException.class, in testAddChild_invalidImplementation()
71 assertThrows(IllegalArgumentException.class, in testBatchUpdate_nullCondition()
77 assertThrows(IllegalArgumentException.class, in testBatchUpdate_invalidImplementation()
83 assertThrows(NullPointerException.class, in testBatchUpdate_nullUpdates()
89 assertThrows(IllegalArgumentException.class, () -> mBuilder.addOnClickAction(42, null)); in testSetOnClickAction_null()
94 assertThrows(IllegalArgumentException.class, in testSetOnClickAction_invalidImplementation()
124 assertThrows(IllegalStateException.class, () -> mBuilder.build()); in testNoMoreInteractionsAfterBuild()
[all …]
DAutofillValueTest.java21 import static org.testng.Assert.assertThrows;
52 assertThrows(IllegalStateException.class, v::getToggleValue); in createTextValue()
53 assertThrows(IllegalStateException.class, v::getListValue); in createTextValue()
54 assertThrows(IllegalStateException.class, v::getDateValue); in createTextValue()
70 assertThrows(IllegalStateException.class, v::getTextValue); in createToggleValue()
71 assertThrows(IllegalStateException.class, v::getListValue); in createToggleValue()
72 assertThrows(IllegalStateException.class, v::getDateValue); in createToggleValue()
88 assertThrows(IllegalStateException.class, v::getTextValue); in createListValue()
89 assertThrows(IllegalStateException.class, v::getToggleValue); in createListValue()
90 assertThrows(IllegalStateException.class, v::getDateValue); in createListValue()
[all …]
DValidatorsTest.java28 import static org.testng.Assert.assertThrows;
51 assertThrows(NullPointerException.class, () -> and((Validator) null)); in testAnd_null()
52 assertThrows(NullPointerException.class, () -> and(mValidValidator, null)); in testAnd_null()
53 assertThrows(NullPointerException.class, () -> and(null, mValidValidator)); in testAnd_null()
58 assertThrows(IllegalArgumentException.class, () -> and(mInvalidValidator)); in testAnd_invalid()
59 assertThrows(IllegalArgumentException.class, () -> and(mValidValidator, mInvalidValidator)); in testAnd_invalid()
60 assertThrows(IllegalArgumentException.class, () -> and(mInvalidValidator, mValidValidator)); in testAnd_invalid()
89 assertThrows(NullPointerException.class, () -> or((Validator) null)); in testOr_null()
90 assertThrows(NullPointerException.class, () -> or(mValidValidator, null)); in testOr_null()
91 assertThrows(NullPointerException.class, () -> or(null, mValidValidator)); in testOr_null()
[all …]
DDatasetTest.java22 import static org.testng.Assert.assertThrows;
71 assertThrows(NullPointerException.class, () -> new Dataset.Builder((RemoteViews) null)); in testBuilder_nullPresentation()
76 assertThrows(NullPointerException.class, in testBuilder_nullInlinePresentation()
89 assertThrows(NullPointerException.class, () -> builder.setInlinePresentation(null)); in testBuilder_setNullInlinePresentation()
100 assertThrows(NullPointerException.class, () -> builder.setValue(null, mValue)); in testBuilder_setValueNullId()
112 assertThrows(NullPointerException.class, () -> builder.setValue(mId, mValue, in testBuilder_setValueWithNullPresentation()
119 assertThrows(NullPointerException.class, () -> builder.setValue(mId, mValue, in testBuilder_setValueWithBothPresentation_nullPresentation()
126 assertThrows(NullPointerException.class, () -> builder.setValue(mId, mValue, in testBuilder_setValueWithBothPresentation_nullInlinePresentation()
133 assertThrows(NullPointerException.class, () -> builder.setValue(mId, mValue, in testBuilder_setValueWithBothPresentation_bothNull()
152 assertThrows(NullPointerException.class, () -> builder.setValue(mId, mValue, mFilter, in testBuilder_setFilteredValueWithPresentation_nullPresentation()
[all …]
DBatchUpdatesTest.java22 import static org.testng.Assert.assertThrows;
43 assertThrows(IllegalArgumentException.class, () -> mBuilder.transformChild(42, null)); in testAddTransformation_null()
48 assertThrows(IllegalArgumentException.class, in testAddTransformation_invalidClass()
54 assertThrows(NullPointerException.class, () -> mBuilder.updateTemplate(null)); in testSetUpdateTemplate_null()
59 assertThrows(IllegalStateException.class, () -> mBuilder.build()); in testEmptyObject()
65 assertThrows(IllegalStateException.class, in testNoMoreChangesAfterBuild()
67 assertThrows(IllegalStateException.class, in testNoMoreChangesAfterBuild()
/cts/common/device-side/util-axt/tests/src/com/android/compatibility/common/util/
DTimeoutTest.java22 import static org.testng.Assert.assertThrows;
50 assertThrows(IllegalArgumentException.class, ()-> new Timeout(null, 1, 2, 2)); in testInvalidConstructor()
51 assertThrows(IllegalArgumentException.class, ()-> new Timeout("", 1, 2, 2)); in testInvalidConstructor()
53 assertThrows(IllegalArgumentException.class, ()-> new Timeout(NAME, -1, 2, 2)); in testInvalidConstructor()
54 assertThrows(IllegalArgumentException.class, ()-> new Timeout(NAME, 0, 2, 2)); in testInvalidConstructor()
56 assertThrows(IllegalArgumentException.class, ()-> new Timeout(NAME, 1, -1, 2)); in testInvalidConstructor()
57 assertThrows(IllegalArgumentException.class, ()-> new Timeout(NAME, 1, 0, 2)); in testInvalidConstructor()
58 assertThrows(IllegalArgumentException.class, ()-> new Timeout(NAME, 1, 1, 2)); in testInvalidConstructor()
60 assertThrows(IllegalArgumentException.class, ()-> new Timeout(NAME, 1, 2, -1)); in testInvalidConstructor()
61 assertThrows(IllegalArgumentException.class, ()-> new Timeout(NAME, 1, 2, 0)); in testInvalidConstructor()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DPasswordRequirementsTest.java23 import static org.testng.Assert.assertThrows;
75 assertThrows(IllegalStateException.class, () -> mDevicePolicyManager in testSettingConstraintsWithLowQualityThrowsOnRPlus()
77 assertThrows(IllegalStateException.class, () -> mDevicePolicyManager in testSettingConstraintsWithLowQualityThrowsOnRPlus()
79 assertThrows(IllegalStateException.class, () -> mDevicePolicyManager in testSettingConstraintsWithLowQualityThrowsOnRPlus()
81 assertThrows(IllegalStateException.class, () -> mDevicePolicyManager in testSettingConstraintsWithLowQualityThrowsOnRPlus()
83 assertThrows(IllegalStateException.class, () -> mDevicePolicyManager in testSettingConstraintsWithLowQualityThrowsOnRPlus()
85 assertThrows(IllegalStateException.class, () -> mDevicePolicyManager in testSettingConstraintsWithLowQualityThrowsOnRPlus()
87 assertThrows(IllegalStateException.class, () -> mDevicePolicyManager in testSettingConstraintsWithLowQualityThrowsOnRPlus()
100 assertThrows(IllegalStateException.class, () -> mDevicePolicyManager in testSettingConstraintsWithNumericQualityOnlyLengthAllowedOnRPlus()
102 assertThrows(IllegalStateException.class, () -> mDevicePolicyManager in testSettingConstraintsWithNumericQualityOnlyLengthAllowedOnRPlus()
[all …]
/cts/tests/tests/voiceinteraction/src/android/voiceinteraction/cts/
DHotwordDetectedResultTest.java21 import static org.testng.Assert.assertThrows;
76 assertThrows(IllegalArgumentException.class, in testHotwordDetectedResult_bundleExceedMaxBundleSize()
87 assertThrows(IllegalArgumentException.class, in testHotwordDetectedResult_setInvalidHotwordPhraseId()
90 assertThrows(IllegalArgumentException.class, in testHotwordDetectedResult_setInvalidHotwordPhraseId()
102 assertThrows(IllegalArgumentException.class, in testHotwordDetectedResult_setInvalidScore()
105 assertThrows(IllegalArgumentException.class, in testHotwordDetectedResult_setInvalidScore()
112 assertThrows(IllegalArgumentException.class, in testHotwordDetectedResult_setInvalidPersonalizedScore()
115 assertThrows(IllegalArgumentException.class, in testHotwordDetectedResult_setInvalidPersonalizedScore()
122 assertThrows(IllegalArgumentException.class, in testHotwordDetectedResult_setInvalidHotwordDurationMillis()
125 assertThrows(IllegalArgumentException.class, in testHotwordDetectedResult_setInvalidHotwordDurationMillis()
[all …]
DHotwordDetectionServiceDefaultMethodTest.java20 import static org.testng.Assert.assertThrows;
37 assertThrows(UnsupportedOperationException.class, in testHotwordDetectionService_onDetect_fromDsp()
47 assertThrows(UnsupportedOperationException.class, in testHotwordDetectionService_onDetect_fromExternalSource()
58 assertThrows(UnsupportedOperationException.class, in testHotwordDetectionService_onDetect_fromMic()
/cts/tests/tests/graphics/src/android/graphics/fonts/
DFontFamilyUpdateRequestTest.java25 import static org.testng.Assert.assertThrows;
59 assertThrows(NullPointerException.class, () -> in font()
61 assertThrows(IllegalArgumentException.class, () -> in font()
63 assertThrows(NullPointerException.class, () -> in font()
66 assertThrows(NullPointerException.class, () -> in font()
69 assertThrows(NullPointerException.class, () -> in font()
72 assertThrows(IllegalArgumentException.class, () -> in font()
92 assertThrows(NullPointerException.class, () -> in fontFamily()
94 assertThrows(IllegalArgumentException.class, () -> in fontFamily()
96 assertThrows(NullPointerException.class, () -> in fontFamily()
[all …]
/cts/tests/tests/simphonebookprovider/src/android/provider/cts/simphonebook/
DSimPhonebookContract_SimRecordsNoSimTest.java23 import static com.android.internal.telephony.testing.TelephonyAssertions.assertThrows;
109 IllegalArgumentException e = assertThrows(IllegalArgumentException.class, in query_nonExistentSim_throwsIllegalArgumentException()
114 e = assertThrows(IllegalArgumentException.class, in query_nonExistentSim_throwsIllegalArgumentException()
119 e = assertThrows(IllegalArgumentException.class, in query_nonExistentSim_throwsIllegalArgumentException()
127 assertThrows(IllegalArgumentException.class, () -> query(SimRecords.getContentUri(1, in query_invalidUri_throwsIllegalArgumentException()
134 assertThrows(IllegalArgumentException.class, () -> in query_subscriptionIdOverflow_throwsIllegalArgumentException()
139 assertThrows(IllegalArgumentException.class, () -> in query_subscriptionIdOverflow_throwsIllegalArgumentException()
144 assertThrows(IllegalArgumentException.class, () -> in query_subscriptionIdOverflow_throwsIllegalArgumentException()
161 assertThrows(UnsupportedOperationException.class, in insert_nonAdnDirUris_throwsUnsupportedOperationException()
165 assertThrows(UnsupportedOperationException.class, in insert_nonAdnDirUris_throwsUnsupportedOperationException()
[all …]
/cts/tests/framework/base/biometrics/src/android/server/biometrics/
DBiometricCryptoTests.java19 import static org.junit.Assert.assertThrows;
41 assertThrows("Key shouldn't be generatable before device credentials are enrolled", in testGenerateKeyWithoutDeviceCredential_throwsException()
52 assertThrows("Key shouldn't be generatable before biometrics are enrolled", in testGenerateKeyWithoutBiometricEnrolled_throwsInvalidAlgorithmParameterException()
100 assertThrows("Biometric auth-per-use key shouldn't be generatable with" in testGenerateKeyWhenCredentialAndBiometricEnrolled()
106 assertThrows("Biometric auth-per-use strongbox-backed key shouldn't" in testGenerateKeyWhenCredentialAndBiometricEnrolled()
114 assertThrows("Biometric time-based key shouldn't be generatable with" in testGenerateKeyWhenCredentialAndBiometricEnrolled()
121 assertThrows("Biometric time-based strongbox-backed key shouldn't be" in testGenerateKeyWhenCredentialAndBiometricEnrolled()
/cts/tests/contentcaptureservice/src/android/contentcaptureservice/cts/unit/
DDataRemovalRequestTest.java23 import static org.testng.Assert.assertThrows;
49 assertThrows(NullPointerException.class, () -> mBuilder.addLocusId(null, NO_FLAGS)); in testBuilder_addLocusId_invalid()
50 assertThrows(NullPointerException.class, () -> mBuilder.addLocusId(null, 666)); in testBuilder_addLocusId_invalid()
63 assertThrows(IllegalStateException.class, () -> mBuilder.addLocusId(mLocusId, NO_FLAGS)); in testBuilder_addLocusIdAfterForEverything()
69 assertThrows(IllegalStateException.class, () -> mBuilder.forEverything()); in testBuilder_forEverythingAfterAddingLocusId()
74 assertThrows(IllegalStateException.class, () -> mBuilder.build()); in testBuild_invalid()
133 assertThrows(IllegalStateException.class, () -> mBuilder.addLocusId(mLocusId, NO_FLAGS)); in testNoMoreInteractionsAfterBuild()
134 assertThrows(IllegalStateException.class, in testNoMoreInteractionsAfterBuild()
136 assertThrows(IllegalStateException.class, () -> mBuilder.forEverything()); in testNoMoreInteractionsAfterBuild()
137 assertThrows(IllegalStateException.class, () -> mBuilder.build()); in testNoMoreInteractionsAfterBuild()
DContentCaptureContextTest.java21 import static org.testng.Assert.assertThrows;
57 assertThrows(NullPointerException.class, () -> new Builder(null)); in testBuilder_invalidId()
62 assertThrows(NullPointerException.class, () -> mBuilder.setExtras(null)); in testBuilder_invalidExtras()
68 assertThrows(IllegalStateException.class, () -> mBuilder.setExtras(mExtras)); in testAfterBuild_setExtras()
74 assertThrows(IllegalStateException.class, () -> mBuilder.build()); in testAfterBuild_build()
112 assertThrows(IllegalArgumentException.class, () -> ContentCaptureContext.forLocusId(null)); in testForLocus_null()
/cts/tests/tests/media/src/android/media/cts/
DRoutingSessionInfoTest.java25 import static org.testng.Assert.assertThrows;
76 assertThrows(IllegalArgumentException.class, () -> new RoutingSessionInfo.Builder( in testBuilderConstructorWithInvalidValues()
78 assertThrows(IllegalArgumentException.class, () -> new RoutingSessionInfo.Builder( in testBuilderConstructorWithInvalidValues()
82 assertThrows(NullPointerException.class, () -> new RoutingSessionInfo.Builder( in testBuilderConstructorWithInvalidValues()
86 assertThrows(IllegalArgumentException.class, () -> new RoutingSessionInfo.Builder( in testBuilderConstructorWithInvalidValues()
88 assertThrows(IllegalArgumentException.class, () -> new RoutingSessionInfo.Builder( in testBuilderConstructorWithInvalidValues()
96 assertThrows(NullPointerException.class, in testBuilderCopyConstructorWithNull()
113 assertThrows(IllegalArgumentException.class, () -> builder.build()); in testBuilderBuildWithEmptySelectedRoutesThrowsIAE()
124 assertThrows(IllegalArgumentException.class, in testBuilderAddRouteMethodsWithIllegalArgumentsThrowsIAE()
126 assertThrows(IllegalArgumentException.class, in testBuilderAddRouteMethodsWithIllegalArgumentsThrowsIAE()
[all …]
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/users/
DUsersTest.java28 import static org.testng.Assert.assertThrows;
179 assertThrows(NeneException.class, () -> in createUser_additionalSystemUser_throwsException()
226 assertThrows(NullPointerException.class, () -> userBuilder.type(null)); in createUser_specifiesNullUserType_throwsException()
235 assertThrows(NeneException.class, userBuilder::create); in createUser_specifiesSystemUserType_throwsException()
282 assertThrows(NeneException.class, userBuilder::create); in createUser_specifiesParentOnNonProfileType_throwsException()
290 assertThrows(NeneException.class, userBuilder::create); in createUser_specifiesProfileTypeWithoutParent_throwsException()
305 assertThrows(NeneException.class, userBuilder::create); in createUser_androidLessThanS_createsManagedProfileNotOnSystemUser_throwsException()
344 assertThrows(NullPointerException.class, in findUsersOfType_nullType_throwsException()
361 assertThrows(NeneException.class, in findUsersOfType_profileType_throwsException()
373 assertThrows(NullPointerException.class, in findUserOfType_nullType_throwsException()
[all …]
/cts/tests/devicepolicy/src/android/devicepolicy/cts/
DCrossProfileAppsTest.java26 import static org.testng.Assert.assertThrows;
174 assertThrows(SecurityException.class, () -> { in startMainActivity_activityNotExported_throwsSecurityException()
184 assertThrows(SecurityException.class, () -> { in startMainActivity_activityNotMain_throwsSecurityException()
195 assertThrows(SecurityException.class, () -> { in startMainActivity_activityIncorrectPackage_throwsSecurityException()
205 assertThrows(SecurityException.class, () -> { in startMainActivity_callingFromPrimaryUser_targetIsPrimaryUser_throwsSecurityException()
218 assertThrows(SecurityException.class, () -> { in startMainActivity_callingFromPrimaryUser_targetIsSecondaryUser_throwsSecurityException()
231 assertThrows(SecurityException.class, () -> { in startMainActivity_callingFromSecondaryUser_targetIsWorkProfile_throwsSecurityException()
242 assertThrows(SecurityException.class, () -> { in getProfileSwitchingLabel_callingFromPrimaryUser_targetIsPrimaryUser_throwsSecurityException()
252 assertThrows(SecurityException.class, () -> { in getProfileSwitchingLabel_callingFromPrimaryUser_targetIsSecondaryUser_throwsSecurityException()
262 assertThrows(SecurityException.class, () -> { in getProfileSwitchingLabel_callingFromSecondaryUser_targetIsWorkProfile_throwsSecurityException()
[all …]
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/devicepolicy/
DDevicePolicyTest.java23 import static org.testng.Assert.assertThrows;
121 assertThrows(NeneException.class, in setProfileOwner_profileOwnerIsAlreadySet_throwsException()
137 assertThrows(NeneException.class, in setProfileOwner_componentNameNotInstalled_throwsException()
148 assertThrows(NeneException.class, in setProfileOwner_componentNameIsNotDPC_throwsException()
156 assertThrows(NullPointerException.class, in setProfileOwner_nullUser_throwsException()
165 assertThrows(NullPointerException.class, in setProfileOwner_nullComponentName_throwsException()
174 assertThrows(NeneException.class, in setProfileOwner_userDoesNotExist_throwsException()
218 assertThrows(NullPointerException.class, in getProfileOwner_nullUser_throwsException()
239 assertThrows(NeneException.class, in setDeviceOwner_deviceOwnerIsAlreadySet_throwsException()
249 assertThrows(NeneException.class, in setDeviceOwner_componentNameNotInstalled_throwsException()
[all …]
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/packages/
DPackageReferenceTest.java21 import static org.testng.Assert.assertThrows;
170 assertThrows(NeneException.class, () -> in grantPermission_installPermission_throwsException()
177 assertThrows(NeneException.class, () -> in grantPermission_nonDeclaredPermission_throwsException()
216 assertThrows(NeneException.class, () -> in grantPermission_packageDoesNotExist_throwsException()
223 assertThrows(NeneException.class, () -> in grantPermission_permissionDoesNotExist_throwsException()
232 assertThrows(NeneException.class, in grantPermission_packageIsNotInstalledForUser_throwsException()
250 assertThrows(NeneException.class, () -> in denyPermission_ownPackage_permissionIsGranted_throwsException()
271 assertThrows(NeneException.class, () -> in denyPermission_packageDoesNotExist_throwsException()
278 assertThrows(NeneException.class, () -> in denyPermission_permissionDoesNotExist_throwsException()
287 assertThrows(NeneException.class, in denyPermission_packageIsNotInstalledForUser_throwsException()
[all …]
DPackagesTest.java22 import static org.testng.Assert.assertThrows;
75 assertThrows(NullPointerException.class, () -> new Packages(/* testApis= */ null)); in construct_nullTestApis_throwsException()
95 assertThrows(NullPointerException.class, () -> mTestApis.packages().find(null)); in find_nullPackageName_throwsException()
110 assertThrows(NullPointerException.class, in installedForUser_nullUserReference_throwsException()
139 assertThrows(NeneException.class, in install_nonExistingPackage_throwsException()
145 assertThrows(NullPointerException.class, in install_nullUser_throwsException()
151 assertThrows(NullPointerException.class, in install_byteArray_nullUser_throwsException()
157 assertThrows(NullPointerException.class, in install_nullApkFile_throwsException()
163 assertThrows(NullPointerException.class, in install_nullByteArray_throwsException()
221 assertThrows(NeneException.class, () -> mTestApis.packages().install(user, in install_userNotStarted_throwsException()
[all …]
/cts/hostsidetests/backup/BackupTransportApp/src/android/cts/backup/backuptransportapp/
DBackupTransportTest.java21 import static org.testng.Assert.assertThrows;
48 assertThrows(UnsupportedOperationException.class, () -> mBackupTransport.name()); in testName_throwsException()
58 assertThrows( in testCurrentDestinationString_throwsException()
70 assertThrows( in testDataManagementIntentLabel_throwsException()
77 assertThrows( in testTransportDirName_throwsException()
145 assertThrows(UnsupportedOperationException.class, () -> mBackupTransport.finishRestore()); in testFinishRestore_throwsException()
186 assertThrows( in testCancelFullBackup_throwsException()
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/utils/
DCtsTestUtils.java26 public static Throwable assertThrows(Runnable action) { in assertThrows() method in CtsTestUtils
27 return assertThrows(Throwable.class, action); in assertThrows()
30 public static <E extends Throwable> E assertThrows(Class<E> exceptionClass, Runnable action) { in assertThrows() method in CtsTestUtils

12345678