BeforeClassWithInfo
public
abstract
@interface
BeforeClassWithInfo
implements
Annotation
com.android.tradefed.testtype.junit4.BeforeClassWithInfo |
与 BeforeClass
类似的保证,但带有注解的方法必须要求使用 TestInformation
参数。在 beforeClass 方法之前运行。
使用 TestInformation.properties()
有助于在静态上下文和非静态上下文之间传递信息。
示例:
@BeforeClassWithInfo public static void beforeClassWithInfo(TestInformation testInfo) { assertNotNull(device); }
另见: