Home
last modified time | relevance | path

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

123456789

/aosp14/frameworks/base/core/tests/coretests/src/android/app/time/
H A DDetectorStatusTypesTest.java25 import static org.junit.Assert.assertThrows;
41 assertThrows(IllegalArgumentException.class, in testRequireValidDetectionAlgorithmStatus()
44 assertThrows(IllegalArgumentException.class, in testRequireValidDetectionAlgorithmStatus()
57 assertThrows(IllegalArgumentException.class, in testFormatAndParseDetectionAlgorithmStatus()
60 assertThrows(IllegalArgumentException.class, in testFormatAndParseDetectionAlgorithmStatus()
63 assertThrows(IllegalArgumentException.class, in testFormatAndParseDetectionAlgorithmStatus()
65 assertThrows(IllegalArgumentException.class, in testFormatAndParseDetectionAlgorithmStatus()
67 assertThrows(IllegalArgumentException.class, in testFormatAndParseDetectionAlgorithmStatus()
78 assertThrows(IllegalArgumentException.class, in testRequireValidDetectorStatus()
80 assertThrows(IllegalArgumentException.class, in testRequireValidDetectorStatus()
[all …]
H A DLocationTimeZoneAlgorithmStatusTest.java38 import static org.junit.Assert.assertThrows;
63 assertThrows(IllegalArgumentException.class, in testConstructorValidation()
71 assertThrows(IllegalArgumentException.class, in testConstructorValidation()
79 assertThrows(IllegalArgumentException.class, in testConstructorValidation()
88 assertThrows(IllegalArgumentException.class, in testConstructorValidation()
95 assertThrows(IllegalArgumentException.class, in testConstructorValidation()
168 assertThrows(IllegalArgumentException.class, in testRequireValidProviderStatus()
171 assertThrows(IllegalArgumentException.class, in testRequireValidProviderStatus()
184 assertThrows(IllegalArgumentException.class, in testFormatAndParseProviderStatus()
187 assertThrows(IllegalArgumentException.class, in testFormatAndParseProviderStatus()
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/android/provider/
H A DSimPhonebookContractTest.java19 import static org.testng.Assert.assertThrows;
31 assertThrows(IllegalArgumentException.class, () -> in getContentUri_invalidEfType_throwsIllegalArgumentException()
34 assertThrows(IllegalArgumentException.class, () -> in getContentUri_invalidEfType_throwsIllegalArgumentException()
37 assertThrows(IllegalArgumentException.class, () -> in getContentUri_invalidEfType_throwsIllegalArgumentException()
45 assertThrows(IllegalArgumentException.class, () -> in getItemUri_invalidEfType_throwsIllegalArgumentException()
48 assertThrows(IllegalArgumentException.class, () -> in getItemUri_invalidEfType_throwsIllegalArgumentException()
51 assertThrows(IllegalArgumentException.class, () -> in getItemUri_invalidEfType_throwsIllegalArgumentException()
59 assertThrows(IllegalArgumentException.class, () -> in getItemUri_invalidRecordIndex_throwsIllegalArgumentException()
63 assertThrows(IllegalArgumentException.class, () -> in getItemUri_invalidRecordIndex_throwsIllegalArgumentException()
/aosp14/frameworks/base/core/tests/coretests/src/com/android/internal/inputmethod/
H A DInputMethodSubtypeHandleTest.java23 import static org.junit.Assert.assertThrows;
57 assertThrows(NullPointerException.class, () -> InputMethodSubtypeHandle.of(null)); in testCreateFromRawHandle()
61 assertThrows(InvalidParameterException.class, () -> InputMethodSubtypeHandle.of( in testCreateFromRawHandle()
64 assertThrows(InvalidParameterException.class, () -> InputMethodSubtypeHandle.of( in testCreateFromRawHandle()
66 assertThrows(InvalidParameterException.class, () -> InputMethodSubtypeHandle.of( in testCreateFromRawHandle()
68 assertThrows(InvalidParameterException.class, () -> InputMethodSubtypeHandle.of( in testCreateFromRawHandle()
70 assertThrows(InvalidParameterException.class, () -> InputMethodSubtypeHandle.of( in testCreateFromRawHandle()
72 assertThrows(InvalidParameterException.class, () -> InputMethodSubtypeHandle.of( in testCreateFromRawHandle()
74 assertThrows(InvalidParameterException.class, () -> InputMethodSubtypeHandle.of( in testCreateFromRawHandle()
76 assertThrows(InvalidParameterException.class, () -> InputMethodSubtypeHandle.of( in testCreateFromRawHandle()
[all …]
/aosp14/frameworks/base/services/tests/wmtests/src/com/android/server/wm/testing/
H A DAssertTest.java19 import static com.android.server.wm.testing.Assert.assertThrows;
35 assertThrows(TestException.class, () -> { in assertThrows_runsRunnable()
45 assertThrows(TestException.class, () -> { in assertThrows_failsIfNothingThrown()
52 assertThrows(TestException.class, () -> { in assertThrows_failsIfWrongExceptionThrown()
59 assertThrows(TestException.class, () -> { in assertThrows_succeedsIfGivenExceptionThrown()
66 assertThrows(RuntimeException.class, () -> { in assertThrows_succeedsIfSubExceptionThrown()
74 assertThrows(TestException.class, () -> { in assertThrows_rethrowsUnexpectedErrors()
/aosp14/frameworks/base/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/
H A DTransactionManagerTest.java30 import static org.junit.Assert.assertThrows;
75 assertThrows(IllegalStateException.class, mTransactionManager::startNewTransaction); in testStartNewTransaction()
117 assertThrows(IllegalStateException.class, mTransactionManager::getCurrentTransactionRecord); in testGetCurrentTransactionRecord()
127 assertThrows(IllegalStateException.class, mTransactionManager::getCurrentTransactionRecord); in testGetCurrentTransactionRecord()
136 assertThrows(IllegalStateException.class, mTransactionManager::getCurrentTransactionRecord); in testGetCurrentTransactionRecord()
184 assertThrows(IllegalStateException.class, in testApply()
186 assertThrows(IllegalStateException.class, in testApply()
188 assertThrows(IllegalStateException.class, in testApply()
199 assertThrows(IllegalStateException.class, in testAbort()
201 assertThrows(IllegalStateException.class, in testAbort()
[all …]
/aosp14/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
H A DActivityInterceptorCallbackRegistryTest.java24 import static org.junit.Assert.assertThrows;
59 assertThrows( in registerActivityInterceptorCallbackFailIfNotSystemId()
68 assertThrows( in registerActivityInterceptorCallbackFailIfIdNotInRange()
74 assertThrows( in registerActivityInterceptorCallbackFailIfIdNotInRange()
83 assertThrows( in registerActivityInterceptorCallbackFailIfCallbackIsNull()
105 assertThrows( in unregisterActivityInterceptorCallbackFailIfNotSystemId()
113 assertThrows( in unRegisterActivityInterceptorCallbackFailIfIdNotInRange()
121 assertThrows( in unregisterActivityInterceptorCallbackFailIfNotRegistered()
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/hdmi/
H A DHdmiCecConfigTest.java26 import static org.testng.Assert.assertThrows;
198 assertThrows(IllegalArgumentException.class, in isStringValueType_InvalidSetting()
212 assertThrows(IllegalArgumentException.class, in isIntValueType_InvalidSetting()
226 assertThrows(IllegalArgumentException.class, in getAllowedStringValues_InvalidSetting()
233 assertThrows(IllegalArgumentException.class, in getAllowedStringValues_InvalidValueType()
263 assertThrows(IllegalArgumentException.class, in getAllowedIntValues_InvalidSetting()
270 assertThrows(IllegalArgumentException.class, in getAllowedIntValues_InvalidValueType()
296 assertThrows(IllegalArgumentException.class, in getDefaultStringValue_InvalidSetting()
303 assertThrows(IllegalArgumentException.class, in getDefaultStringValue_InvalidValueType()
338 assertThrows(RuntimeException.class, in getDefaultStringValue_NoDefault()
[all …]
/aosp14/frameworks/base/services/tests/mockingservicestests/src/com/android/server/location/altitude/
H A DAltitudeConverterTest.java21 import static org.junit.Assert.assertThrows;
124 assertThrows(IllegalArgumentException.class, in testAddMslAltitudeToLocation_invalidLatitudeThrows()
128 assertThrows(IllegalArgumentException.class, in testAddMslAltitudeToLocation_invalidLatitudeThrows()
132 assertThrows(IllegalArgumentException.class, in testAddMslAltitudeToLocation_invalidLatitudeThrows()
143 assertThrows(IllegalArgumentException.class, in testAddMslAltitudeToLocation_invalidLongitudeThrows()
147 assertThrows(IllegalArgumentException.class, in testAddMslAltitudeToLocation_invalidLongitudeThrows()
151 assertThrows(IllegalArgumentException.class, in testAddMslAltitudeToLocation_invalidLongitudeThrows()
161 assertThrows(IllegalArgumentException.class, in testAddMslAltitudeToLocation_invalidAltitudeThrows()
165 assertThrows(IllegalArgumentException.class, in testAddMslAltitudeToLocation_invalidAltitudeThrows()
169 assertThrows(IllegalArgumentException.class, in testAddMslAltitudeToLocation_invalidAltitudeThrows()
/aosp14/frameworks/base/core/tests/coretests/src/com/android/internal/util/
H A DHexDumpTest.java38 assertThrows( in testNullByteArray()
121 assertThrows( in testHexStringToByteArray_null()
129 assertThrows( in testHexStringToByteArray_invalidCharacters()
132 assertThrows( in testHexStringToByteArray_invalidCharacters()
135 assertThrows( in testHexStringToByteArray_invalidCharacters()
143 assertThrows( in testHexStringToByteArray_oddLength()
146 assertThrows( in testHexStringToByteArray_oddLength()
149 assertThrows( in testHexStringToByteArray_oddLength()
160 private static void assertThrows(Class<? extends RuntimeException> clazz, Runnable runnable) { in assertThrows() method in HexDumpTest
/aosp14/frameworks/base/core/tests/coretests/src/android/hardware/input/
H A DVirtualTouchEventTest.java21 import static org.testng.Assert.assertThrows;
33 assertThrows(IllegalArgumentException.class, () -> new VirtualTouchEvent.Builder().build()); in touchEvent_emptyBuilder()
38 assertThrows(IllegalArgumentException.class, () -> new VirtualTouchEvent.Builder() in touchEvent_noAction()
48 assertThrows(IllegalArgumentException.class, () -> new VirtualTouchEvent.Builder() in touchEvent_noPointerId()
58 assertThrows(IllegalArgumentException.class, () -> new VirtualTouchEvent.Builder() in touchEvent_noToolType()
68 assertThrows(IllegalArgumentException.class, () -> new VirtualTouchEvent.Builder() in touchEvent_noX()
79 assertThrows(IllegalArgumentException.class, () -> new VirtualTouchEvent.Builder() in touchEvent_noY()
130 assertThrows(IllegalArgumentException.class, () -> new VirtualTouchEvent.Builder() in touchEvent_cancelUsedImproperly()
147 assertThrows(IllegalArgumentException.class, () -> new VirtualTouchEvent.Builder() in touchEvent_palmUsedImproperly()
H A DVirtualMouseButtonEventTest.java21 import static org.testng.Assert.assertThrows;
33 assertThrows(IllegalArgumentException.class, in buttonEvent_emptyBuilder()
39 assertThrows(IllegalArgumentException.class, () -> new VirtualMouseButtonEvent.Builder() in buttonEvent_noButtonCode()
45 assertThrows(IllegalArgumentException.class, () -> new VirtualMouseButtonEvent.Builder() in buttonEvent_noAction()
H A DVirtualKeyEventTest.java21 import static org.testng.Assert.assertThrows;
35 assertThrows(IllegalArgumentException.class, () -> new VirtualKeyEvent.Builder().build()); in keyEvent_emptyBuilder()
40 assertThrows(IllegalArgumentException.class, in keyEvent_noKeyCode()
46 assertThrows(IllegalArgumentException.class, in keyEvent_noAction()
/aosp14/frameworks/base/core/tests/coretests/src/android/view/contentcapture/
H A DContentCaptureSessionTest.java21 import static org.testng.Assert.assertThrows;
66 assertThrows(NullPointerException.class, () -> mSession1.newAutofillId(null, 42L)); in testNewAutofillId_invalid()
67 assertThrows(IllegalArgumentException.class, in testNewAutofillId_invalid()
93 assertThrows(NullPointerException.class, () -> mSession1.notifyViewAppeared(null)); in testNotifyXXX_null()
94 assertThrows(NullPointerException.class, () -> mSession1.notifyViewDisappeared(null)); in testNotifyXXX_null()
95 assertThrows(NullPointerException.class, in testNotifyXXX_null()
97 assertThrows(NullPointerException.class, in testNotifyXXX_null()
121 assertThrows(NullPointerException.class, in testNotifyViewsDisappeared_invalid()
124 assertThrows(IllegalArgumentException.class, in testNotifyViewsDisappeared_invalid()
127 assertThrows(IllegalArgumentException.class, in testNotifyViewsDisappeared_invalid()
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/android/os/
H A DVibrationEffectTest.java32 import static org.testng.Assert.assertThrows;
460 assertThrows(IllegalArgumentException.class, in testValidateOneShot()
462 assertThrows(IllegalArgumentException.class, in testValidateOneShot()
464 assertThrows(IllegalArgumentException.class, in testValidateOneShot()
466 assertThrows(IllegalArgumentException.class, in testValidateOneShot()
468 assertThrows(IllegalArgumentException.class, in testValidateOneShot()
477 assertThrows(IllegalArgumentException.class, in testValidatePrebaked()
487 assertThrows(IllegalArgumentException.class, in testValidateWaveform()
550 assertThrows(IllegalStateException.class, in testValidateWaveformBuilder()
596 assertThrows(IllegalStateException.class, in testValidateComposed()
[all …]
H A DParcelTest.java21 import static org.junit.Assert.assertThrows;
189 assertThrows(IllegalArgumentException.class, in testCompareDataInRange_whenLimitOutOfBounds_throws()
191 assertThrows(IllegalArgumentException.class, in testCompareDataInRange_whenLimitOutOfBounds_throws()
193 assertThrows(IllegalArgumentException.class, in testCompareDataInRange_whenLimitOutOfBounds_throws()
195 assertThrows(IllegalArgumentException.class, in testCompareDataInRange_whenLimitOutOfBounds_throws()
197 assertThrows(IllegalArgumentException.class, in testCompareDataInRange_whenLimitOutOfBounds_throws()
231 assertThrows(IllegalArgumentException.class, () -> Parcel.compareData(pA, iA, pB, iB, -1)); in testCompareDataInRange_whenNegativeLength_throws()
246 assertThrows(IllegalArgumentException.class, () -> Parcel.compareData(pA, -1, pB, iB, 0)); in testCompareDataInRange_whenNegativeOffset_throws()
247 assertThrows(IllegalArgumentException.class, () -> Parcel.compareData(pA, 0, pB, -1, 0)); in testCompareDataInRange_whenNegativeOffset_throws()
H A DBundleMergerTest.java35 import static org.junit.Assert.assertThrows;
74 assertThrows(Exception.class, () -> { in testMixedTypes()
77 assertThrows(Exception.class, () -> { in testMixedTypes()
80 assertThrows(Exception.class, () -> { in testMixedTypes()
117 assertThrows(Exception.class, () -> { in testStrategyComparableMin()
129 assertThrows(Exception.class, () -> { in testStrategyComparableMax()
141 assertThrows(Exception.class, () -> { in testStrategyNumberAdd()
169 assertThrows(Exception.class, () -> { in testStrategyBooleanAnd()
181 assertThrows(Exception.class, () -> { in testStrategyBooleanOr()
201 assertThrows(Exception.class, () -> { in testStrategyArrayAppend()
[all …]
/aosp14/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/
H A DDensityMappingTest.java22 import static org.junit.Assert.assertThrows;
36 assertThrows(IllegalStateException.class, () -> in testConstructor_withBadConfig_throwsException()
42 assertThrows(IllegalStateException.class, () -> in testConstructor_withBadConfig_throwsException()
48 assertThrows(IllegalStateException.class, () -> in testConstructor_withBadConfig_throwsException()
54 assertThrows(IllegalStateException.class, () -> in testConstructor_withBadConfig_throwsException()
61 assertThrows(IllegalStateException.class, () -> in testConstructor_withBadConfig_throwsException()
/aosp14/frameworks/base/core/tests/BroadcastRadioTests/src/android/hardware/radio/
H A DDefaultRadioTunerTest.java21 import static org.junit.Assert.assertThrows;
130 UnsupportedOperationException thrown = assertThrows( in seek_forRadioTuner_throwsException()
154 UnsupportedOperationException thrown = assertThrows( in isConfigFlagSet_forRadioTuner_throwsException()
165 UnsupportedOperationException thrown = assertThrows(UnsupportedOperationException.class, in setConfigFlag_forRadioTuner_throwsException()
174 UnsupportedOperationException thrown = assertThrows(UnsupportedOperationException.class, in setParameters_forRadioTuner_throwsException()
183 UnsupportedOperationException thrown = assertThrows(UnsupportedOperationException.class, in getParameters_forRadioTuner_throwsException()
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/certificate/
H A DCertUtilsTest.java21 import static org.testng.Assert.assertThrows;
93 assertThrows(CertParsingException.class, () -> CertUtils.decodeCert(in)); in decodeCert_readPemFile_throwsIfNoBeginEndLines()
99 assertThrows(CertParsingException.class, () -> CertUtils.decodeCert(in)); in decodeCert_readPemFile_throwsIfEmptyBlock()
105 assertThrows(CertParsingException.class, () -> CertUtils.decodeCert(in)); in decodeCert_readPemFile_throwsIfInvalidCert()
221 assertThrows( in verifyRsaSha256Signature_throwsIfMismatchSignature()
234 assertThrows( in verifyRsaSha256Signature_throwsIfWrongKeyType()
297 assertThrows( in buildCertPath_throwsIfWrongRootCommonName()
312 assertThrows( in buildCertPath_throwsIfMissingIntermediateCert()
350 assertThrows( in validateCertPath_throwsIfNotValidated()
373 assertThrows( in validateCert_throwsIfExpired()
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/com/android/internal/infra/
H A DWhitelistHelperTest.java21 import static org.testng.Assert.assertThrows;
50 assertThrows(IllegalArgumentException.class, in testSetWhitelist_emptyArguments()
52 assertThrows(IllegalArgumentException.class, in testSetWhitelist_emptyArguments()
54 assertThrows(IllegalArgumentException.class, in testSetWhitelist_emptyArguments()
60 assertThrows(NullPointerException.class, in testWhitelistHelper_nullArguments()
62 assertThrows(NullPointerException.class, in testWhitelistHelper_nullArguments()
64 assertThrows(NullPointerException.class, in testWhitelistHelper_nullArguments()
/aosp14/frameworks/base/core/tests/coretests/src/android/view/textclassifier/
H A DTextClassifierUtilsTest.java21 import static org.testng.Assert.assertThrows;
81 assertThrows(() -> TextClassifier.Utils.getSubString(null, 0, 1, minimumLength)); in testGetSubString_invalidParams()
83 assertThrows(() -> TextClassifier.Utils.getSubString(text, 6, 5, minimumLength)); in testGetSubString_invalidParams()
85 assertThrows(() -> TextClassifier.Utils.getSubString(text, -1, 5, minimumLength)); in testGetSubString_invalidParams()
87 assertThrows(() -> TextClassifier.Utils.getSubString(text, 6, length + 1, minimumLength)); in testGetSubString_invalidParams()
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/disableflags/
H A DDisableFlagsLoggerTest.kt22 import org.junit.Assert.assertThrows
102 assertThrows(IllegalArgumentException::class.java) {
115 assertThrows(IllegalArgumentException::class.java) {
128 assertThrows(IllegalArgumentException::class.java) {
141 assertThrows(IllegalArgumentException::class.java) {
/aosp14/frameworks/base/core/tests/overlaytests/device/src/com/android/overlaytest/
H A DFabricatedOverlaysTest.java23 import static org.testng.Assert.assertThrows;
164 assertThrows(SecurityException.class, () -> in testInvalidOwningPackageName()
181 assertThrows(SecurityException.class, () -> in testInvalidOverlayName()
212 assertThrows(SecurityException.class, () -> in testOverlayIdentifierLongest()
226 assertThrows(NullPointerException.class, in setResourceValue_withNullResourceName()
235 assertThrows(IllegalArgumentException.class, in setResourceValue_withEmptyResourceName()
244 assertThrows(IllegalArgumentException.class, in setResourceValue_withEmptyPackageName()
253 assertThrows(IllegalArgumentException.class, in setResourceValue_withInvalidTypeName()
262 assertThrows(IllegalArgumentException.class, in setResourceValue_withEmptyTypeName()
275 assertThrows(SecurityException.class, () -> in testInvalidResourceValues()
[all …]
/aosp14/frameworks/base/media/tests/AudioPolicyTest/src/com/android/audiopolicytest/
H A DAudioMixingRuleUnitTests.java36 import static org.junit.Assert.assertThrows;
87 assertThrows(IllegalArgumentException.class, in testConstructRuleWithConflictingCriteriaFails()
115 assertThrows(IllegalArgumentException.class, in failsWhenAddAttributeRuleCalledWithInvalidType()
125 assertThrows(IllegalArgumentException.class, in failsWhenExcludeAttributeRuleCalledWithInvalidType()
135 assertThrows(IllegalArgumentException.class, in failsWhenAddIntRuleCalledWithInvalidType()
144 assertThrows(IllegalArgumentException.class, in failsWhenExcludeIntRuleCalledWithInvalidType()
170 assertThrows(IllegalArgumentException.class, in settingTheMixTypeToIncompatibleInjectorMixFails()
181 assertThrows(IllegalArgumentException.class, in addingPlayersOnlyRuleWithInjectorsOnlyRuleFails()
217 assertThrows(IllegalArgumentException.class, in audioMixingRuleWithNoRulesFails()

123456789