Home
last modified time | relevance | path

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

/test/app_compat/csuite/harness/src/test/java/com/android/csuite/testing/
DMoreAssertsTest.java19 import static com.android.csuite.testing.MoreAsserts.assertThrows;
32 assertThrows( in assertThrows_noExceptionThrown_fails()
43 assertThrows( in assertThrows_differentExceptionTypeThrown_fails()
52 assertThrows( in assertThrows_superTypeOfExpectedExceptionTypeThrown_fails()
64 assertThrows( in assertThrows_expectedExceptionTypeThrown_returnsSameObject()
78 assertThrows( in assertThrows_subTypeOfExpectedExceptionTypeThrown_returnsSameObject()
DMoreAsserts.java44 public static <T extends Throwable> T assertThrows( in assertThrows() method in MoreAsserts
/test/app_compat/csuite/harness/src/test/java/com/android/csuite/core/
DSystemAppUninstallerTest.java18 import static org.testng.Assert.assertThrows;
47 assertThrows( in uninstallPackage_packageNameIsNull_throws()
62 assertThrows( in uninstallPackage_frameworkNotRunning_startsFrameworkOrThrows()
104 assertThrows( in uninstallPackage_checkPackageInstalledCommandFailed_throws()
118 assertThrows( in uninstallPackage_getInstallDirectoryCommandFailed_throws()
158 assertThrows( in uninstallPackage_adbRootCommandFailed_throws()
168 assertThrows( in uninstallPackage_adbRootFailed_throws()
178 assertThrows( in uninstallPackage_adbDisableRootCommandFailed_throws()
188 assertThrows( in uninstallPackage_adbDisableRootFailed_throws()
200 assertThrows( in uninstallPackage_adbRemountFailed_throws()
[all …]
DApkInstallerTest.java18 import static org.junit.Assert.assertThrows;
55 assertThrows(ApkInstallerException.class, () -> sut.install(root)); in install_failedToListApks_throwsException()
68 assertThrows(ApkInstallerException.class, () -> sut.install(root)); in install_installCommandFailed_throwsException()
100 assertThrows(ApkInstallerException.class, () -> sut.install(root)); in install_parsePackageNameFailed_throwsException()
DFileBasedTemplateMappingProviderTest.java21 import static org.junit.Assert.assertThrows;
97 assertThrows(IllegalArgumentException.class, () -> sut.get()); in get_lineContainsTooMuchItems_throwsException()
105 assertThrows(IllegalArgumentException.class, () -> sut.get()); in get_lineContainsWrongSeparater_throwsException()
DModuleGeneratorTest.java21 import static org.testng.Assert.assertThrows;
192 assertThrows(IllegalArgumentException.class, () -> generator.split()); in split_emptyModuleNameProvided_throwsException()
213 assertThrows(IllegalArgumentException.class, () -> generator.split()); in split_duplicatedModuleNamesProvided_throwsException()
261 assertThrows(UncheckedIOException.class, () -> generator.split()); in split_streamThrowsException_throwsException()
275 assertThrows(UncheckedIOException.class, () -> generator.split()); in split_providerThrowsException_throwsException()
DAppCrawlTesterHostPreparerTest.java34 import static org.junit.Assert.assertThrows;
111 assertThrows(TargetSetupError.class, () -> suj.setUp(mTestInfo)); in setUp_commandsFailed_throwsException()
131 assertThrows(TargetSetupError.class, () -> suj.setUp(mTestInfo)); in isReady_setUpFailed_returnsFalse()
DDeviceUtilsTest.java21 import static org.junit.Assert.assertThrows;
109 assertThrows(DeviceUtilsException.class, () -> sut.isPackageInstalled("package.name")); in isPackageInstalled_commandFailed_throws()
122 assertThrows(DeviceUtilsException.class, () -> sut.launchPackage("package.name")); in launchPackage_pmDumpFailedAndPackageDoesNotExist_throws()
135 assertThrows(DeviceUtilsException.class, () -> sut.launchPackage("package.name")); in launchPackage_pmDumpFailedAndPackageExists_throws()
157 assertThrows(DeviceUtilsException.class, () -> sut.launchPackage("com.google.android.gms")); in launchPackage_amStartCommandFailed_throws()
181 assertThrows(DeviceUtilsException.class, () -> sut.launchPackage("com.google.android.gms")); in launchPackage_amFailedToLaunchThePackage_throws()
358 assertThrows(DeviceUtilsException.class, () -> sut.getLaunchActivity(pmDump)); in getLaunchActivity_noMainOrLauncherActivities_throws()
367 assertThrows(DeviceRuntimeException.class, () -> sut.currentTimeMillis()); in currentTimeMillis_deviceCommandFailed_throwsException()
376 assertThrows(DeviceRuntimeException.class, () -> sut.currentTimeMillis()); in currentTimeMillis_unexpectedFormat_throwsException()
432 assertThrows( in runWithScreenRecording_jobThrowsException_videoFileIsHandled()
DTestUtilsTest.java20 import static org.junit.Assert.assertThrows;
186 assertThrows(TestUtils.TestUtilsException.class, () -> TestUtils.listApks(root)); in listApks_withApkDirectoryContainingNoApks_throwException()
195 assertThrows(TestUtils.TestUtilsException.class, () -> TestUtils.listApks(root)); in listApks_withApkDirectoryContainingOnlyObbFiles_throwException()
203 assertThrows(TestUtils.TestUtilsException.class, () -> TestUtils.listApks(root)); in listApks_withNonApkFile_throwException()
213 assertThrows(TestUtils.TestUtilsException.class, () -> TestUtils.listApks(root)); in listApks_withMultipleSingleApks_throwException()
225 assertThrows(TestUtils.TestUtilsException.class, () -> TestUtils.listApks(root)); in listApks_withApksInMultipleDirectories_throwException()
DAppCrawlTesterTest.java24 import static org.junit.Assert.assertThrows;
88 assertThrows(NullPointerException.class, () -> sut.startCrawl()); in startCrawl_apkNotProvided_throwsException()
100 assertThrows(AssertionError.class, () -> sut.startCrawl()); in startCrawl_roboscriptDirectoryProvided_throws()
112 assertThrows(AssertionError.class, () -> sut.startCrawl()); in startCrawl_crawlGuidanceDirectoryProvided_throws()
146 assertThrows(AssertionError.class, () -> sut.runTest()); in runTest_dropboxEntriesDetected_throws()
164 assertThrows(AssertionError.class, () -> sut.runTest()); in runTest_crawlerExceptionIsThrown_throws()
333 assertThrows(AppCrawlTester.CrawlerException.class, () -> sut.startCrawl()); in startCrawl_withApkDirectoryContainingNoApks_throwException()
344 assertThrows(AppCrawlTester.CrawlerException.class, () -> sut.startCrawl()); in startCrawl_withNonApkPath_throwException()
359 assertThrows(AppCrawlTester.CrawlerException.class, () -> sut.startCrawl()); in startCrawl_withApksInMultipleDirectories_throwException()
368 assertThrows(AppCrawlTester.CrawlerException.class, () -> sut.startCrawl()); in startCrawl_preparerNotRun_throwsException()
[all …]
DModuleTemplateTest.java21 import static org.junit.Assert.assertThrows;
135 assertThrows(IllegalArgumentException.class, () -> ModuleTemplate.loadFrom(config)); in loadFrom_templateMappingContainsNonexistTemplates_throwsException()
212 assertThrows(IllegalArgumentException.class, () -> ModuleTemplate.loadFrom(config)); in loadFrom_duplicateTemplateMappingEntries_throwsException()
/test/app_compat/csuite/harness/src/test/java/com/android/csuite/config/
DAppRemoteFileResolverTest.java19 import static com.android.csuite.testing.MoreAsserts.assertThrows;
96 assertThrows( in unsupportedUriScheme_throwsException()
110 assertThrows( in opaqueUri_throwsException()
123 assertThrows( in uriHasPathComponent_throwsException()
146 assertThrows( in emptyTemplate_throwsException()
171 assertThrows( in templateContainsPlaceholderForUndefinedVar_throwsException()
183 assertThrows( in templateExpandsToInvalidUri_throwsException()
208 assertThrows( in templateExpandsToAppUri_throwsException()
/test/app_compat/csuite/harness/src/test/java/com/android/compatibility/targetprep/
DAppSetupPreparerTest.java43 import static org.testng.Assert.assertThrows;
143 assertThrows(TargetSetupError.class, () -> preparer.setUp(createTestInfo())); in setUp_exceedsRetryLimit_throwsException()
153 assertThrows(IllegalArgumentException.class, () -> preparer.setUp(createTestInfo())); in setUp_negativeTimeout_throwsException()
204 assertThrows(IllegalArgumentException.class, () -> preparer.setUp(createTestInfo())); in setUp_negativeMaxRetry_throwsException()
220 assertThrows( in setUp_deviceNotAvailableAndWaitEnabled_throwsDeviceNotAvailableException()
236 assertThrows(TargetSetupError.class, () -> preparer.setUp(createTestInfo(device))); in setUp_deviceAvailableAndWaitEnabled_doesNotChangeException()
251 assertThrows(TargetSetupError.class, () -> preparer.setUp(createTestInfo(device))); in setUp_deviceNotAvailableAndWaitDisabled_doesNotChangeException()
264 assertThrows(IllegalArgumentException.class, () -> preparer.setUp(createTestInfo())); in setUp_negativeExponentialBackoffMultiplier_throwsIllegalArgumentException()
380 assertThrows(TargetSetupError.class, () -> preparer.setUp(createTestInfo())); in setUp_zeroExponentialBackoffMultiplier_noSleepBetweenRetries()
398 assertThrows(TargetSetupError.class, () -> preparer.setUp(createTestInfo())); in setUp_positiveExponentialBackoffMultiplier_sleepsBetweenRetries()
[all …]
DCheckGmsPreparerTest.java20 import static org.testng.Assert.assertThrows;
94 assertThrows(TargetSetupError.class, () -> mPreparer.setUp(testInfo)); in tearDown_setUpThrows_doesNotCheck()
160 assertThrows(TargetSetupError.class, () -> mPreparer.setUp(createTestInfo(device))); in setUp_gmsProcessNotRecoveredAfterReboot_throwsException()
/test/suite_harness/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/targetprep/
DInteractiveResultCollectorTest.java18 import static org.junit.Assert.assertThrows;
61 assertThrows(TargetSetupError.class, () -> mCollector.setUp(mTestInfo)); in setUp_nonDeviceBuildInfo_throwException()
DBusinessLogicPreparerTest.java20 import static org.junit.Assert.assertThrows;
219 assertThrows( in testGetSuiteVersionExtractedNonMatchingRegex()