Home
last modified time | relevance | path

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

123

/cts/tests/autofillservice/src/android/autofillservice/cts/
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 …]
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;
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 …]
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()
DAutofillValueTest.java21 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 …]
DVisibilitySetterActionTest.java23 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()
DRegexValidatorTest.java23 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()
DCharSequenceTransformationTest.java26 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()
DImageTransformationTest.java25 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()
DDateTransformationTest.java25 import static org.testng.Assert.assertThrows;
52 assertThrows(NullPointerException.class, in testConstructor_nullFieldId()
58 assertThrows(NullPointerException.class, () -> new DateTransformation(mFieldId, null)); in testConstructor_nullDateFormat()
DTextValueSanitizerTest.java21 import static org.testng.Assert.assertThrows;
40 assertThrows(NullPointerException.class, in testConstructor_nullValues()
42 assertThrows(NullPointerException.class, in testConstructor_nullValues()
DLuhnChecksumValidatorTest.java23 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/
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/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 …]
DRetryRuleTest.java26 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/
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()
DContentCaptureConditionTest.java22 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/
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
/cts/hostsidetests/devicepolicy/app/TransferOwnerOutgoingApp/src/com/android/cts/transferowner/
DDeviceAndProfileOwnerTransferOutgoingTest.java22 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/
DLocusIdTest.java20 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/
DTransferDeviceOwnerIncomingTest.java21 import static org.testng.Assert.assertThrows;
43 assertThrows(SecurityException.class, () -> { in testTransferPoliciesAreRetainedAfterTransfer()

123