/*
Represents a collection of test classes present on the classpath. You can add individual classes or entire packages. By default sub-packages are included recursively, but methods are provided to allow for arbitrary inclusion or exclusion of sub-packages. Typically a
TestGrouping will have only one root package, but this is not a requirement. Not needed for 1.0 SDK.
Include all tests in the given packages and all their sub-packages, unless otherwise specified. Each of the given packages must contain at least one test class, either directly or in a sub-package.
-
Parameters:
-
packageNamesNames of packages to add.
Returns:
-
The
for method chaining.TestGrouping
Exclude all tests in the given packages and all their sub-packages, unless otherwise specified.
-
Parameters:
-
packageNamesNames of packages to remove.
Returns:
-
The
for method chaining.TestGrouping
-
Returns:
-
The first package name passed to
, or null if that method was never called.addPackagesRecursive(java.lang.String[])
// The cast below is not necessary with the Java 5 compiler, but necessary with the Java 6 compiler,
本文介绍Android测试框架中TestGrouping类的实现细节,包括如何添加或移除测试包、获取测试方法等核心功能,并提供了类的具体实现代码。

被折叠的 条评论
为什么被折叠?



