/cts/tests/autofillservice/src/android/autofillservice/cts/ |
D | FillResponseTest.java | 24 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 …]
|
D | UserDataTest.java | 29 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 …]
|
D | SaveInfoTest.java | 26 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 …]
|
D | CustomDescriptionUnitTest.java | 22 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 …]
|
D | ValidatorsTest.java | 28 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 …]
|
D | DatasetTest.java | 22 import static org.testng.Assert.assertThrows; 49 assertThrows(NullPointerException.class, () -> new Dataset.Builder(null)); in testBuilder_nullPresentation() 55 assertThrows(NullPointerException.class, () -> builder.setValue(null, mValue)); in testBuilder_setValueNullId() 67 assertThrows(NullPointerException.class, () -> builder.setValue(mId, mValue, in testBuilder_setValueWithNullPresentation() 86 assertThrows(NullPointerException.class, () -> builder.setValue(mId, mValue, mFilter, in testBuilder_setFilteredValueWithPresentationNullPresentation() 93 assertThrows(IllegalStateException.class, () -> builder.setValue(mId, mValue, mFilter)); in testBuilder_setFilteredValueWithoutPresentation() 99 assertThrows(IllegalStateException.class, () -> builder.build()); in testBuild_noValues() 107 assertThrows(IllegalStateException.class, () -> builder.build()); in testNoMoreInteractionsAfterBuild() 108 assertThrows(IllegalStateException.class, () -> builder.setValue(mId, mValue)); in testNoMoreInteractionsAfterBuild() 109 assertThrows(IllegalStateException.class, in testNoMoreInteractionsAfterBuild() [all …]
|
D | BatchUpdatesTest.java | 22 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()
|
D | AutofillValueTest.java | 21 import static org.testng.Assert.assertThrows; 107 assertThrows(IllegalStateException.class, v::getToggleValue); 108 assertThrows(IllegalStateException.class, v::getListValue); 109 assertThrows(IllegalStateException.class, v::getDateValue); 125 assertThrows(IllegalStateException.class, v::getTextValue); 126 assertThrows(IllegalStateException.class, v::getListValue); 127 assertThrows(IllegalStateException.class, v::getDateValue); 143 assertThrows(IllegalStateException.class, v::getTextValue); 144 assertThrows(IllegalStateException.class, v::getToggleValue); 145 assertThrows(IllegalStateException.class, v::getDateValue); [all …]
|
D | VisibilitySetterActionTest.java | 23 import static org.testng.Assert.assertThrows; 55 assertThrows(IllegalArgumentException.class, in testInvalidVisibilities() 59 assertThrows(IllegalArgumentException.class, in testInvalidVisibilities() 119 assertThrows(IllegalStateException.class, () -> builder.build()); in testNoMoreInteractionsAfterBuild() 120 assertThrows(IllegalStateException.class, () -> builder.setVisibility(108, View.GONE)); in testNoMoreInteractionsAfterBuild()
|
D | RegexValidatorTest.java | 23 import static org.testng.Assert.assertThrows; 43 assertThrows(NullPointerException.class, () -> new RegexValidator(null, null)); in allNullConstructor() 48 assertThrows(NullPointerException.class, in nullRegexConstructor() 54 assertThrows(NullPointerException.class, in nullAutofillIdConstructor()
|
D | CharSequenceTransformationTest.java | 26 import static org.testng.Assert.assertThrows; 47 assertThrows(NullPointerException.class, in testAllNullBuilder() 53 assertThrows(NullPointerException.class, in testNullAutofillIdBuilder() 59 assertThrows(NullPointerException.class, in testNullRegexBuilder() 65 assertThrows(NullPointerException.class, in testNullSubstBuilder() 98 assertThrows(IndexOutOfBoundsException.class, () -> trans.apply(finder, template, 0)); in testBadSubst()
|
D | ImageTransformationTest.java | 25 import static org.testng.Assert.assertThrows; 47 assertThrows(NullPointerException.class, in testAllNullBuilder() 54 assertThrows(NullPointerException.class, in testNullAutofillIdBuilder() 61 assertThrows(NullPointerException.class, in testNullRegexBuilder() 68 assertThrows(IllegalArgumentException.class, in testNullSubstBuilder()
|
D | DateTransformationTest.java | 25 import static org.testng.Assert.assertThrows; 52 assertThrows(NullPointerException.class, in testConstructor_nullFieldId() 58 assertThrows(NullPointerException.class, () -> new DateTransformation(mFieldId, null)); in testConstructor_nullDateFormat()
|
D | TextValueSanitizerTest.java | 21 import static org.testng.Assert.assertThrows; 40 assertThrows(NullPointerException.class, in testConstructor_nullValues() 42 assertThrows(NullPointerException.class, in testConstructor_nullValues()
|
D | LuhnChecksumValidatorTest.java | 23 import static org.testng.Assert.assertThrows; 41 assertThrows(NullPointerException.class, in nullId() 47 assertThrows(NullPointerException.class, in nullAndOtherId()
|
/cts/common/device-side/util/tests/src/com/android/compatibility/common/util/ |
D | TimeoutTest.java | 22 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/common/device-side/util-axt/tests/src/com/android/compatibility/common/util/ |
D | TimeoutTest.java | 22 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 …]
|
D | RetryRuleTest.java | 26 import static org.testng.Assert.assertThrows; 88 assertThrows(IllegalArgumentException.class, () -> new RetryRule(-1)); in testInvalidConstructor() 89 assertThrows(IllegalArgumentException.class, () -> new RetryRule(-1, null)); in testInvalidConstructor() 90 assertThrows(IllegalArgumentException.class, () -> new RetryRule(-1, () -> {})); in testInvalidConstructor()
|
/cts/tests/contentcaptureservice/src/android/contentcaptureservice/cts/unit/ |
D | DataRemovalRequestTest.java | 23 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()
|
D | ContentCaptureContextTest.java | 21 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()
|
D | ContentCaptureConditionTest.java | 22 import static org.testng.Assert.assertThrows; 42 assertThrows(NullPointerException.class, () -> new ContentCaptureCondition(null, NO_FLAGS)); in testInvalid_nullLocusId()
|
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/utils/ |
D | CtsTestUtils.java | 26 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
|
/cts/hostsidetests/devicepolicy/app/TransferOwnerOutgoingApp/src/com/android/cts/transferowner/ |
D | DeviceAndProfileOwnerTransferOutgoingTest.java | 22 import static org.testng.Assert.assertThrows; 94 assertThrows( in testTransferSameAdmin() 105 assertThrows( in testTransferInvalidTarget() 140 assertThrows( in testTransferOwnershipNoMetadata() 175 assertThrows(SecurityException.class, mDevicePolicyManager::getTransferOwnershipBundle); in testGetTransferOwnershipBundleOnlyCalledFromAdmin()
|
/cts/tests/tests/content/src/android/content/cts/ |
D | LocusIdTest.java | 20 import static org.testng.Assert.assertThrows; 41 assertThrows(IllegalArgumentException.class, () -> new LocusId(null)); in testConstructor_nullId() 46 assertThrows(IllegalArgumentException.class, () -> new LocusId("")); in testConstructor_emptyId()
|
/cts/hostsidetests/devicepolicy/app/TransferOwnerIncomingApp/src/com/android/cts/transferowner/ |
D | TransferDeviceOwnerIncomingTest.java | 21 import static org.testng.Assert.assertThrows; 43 assertThrows(SecurityException.class, () -> { in testTransferPoliciesAreRetainedAfterTransfer()
|