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); }
מידע נוסף: