TestDescription
public
final
class
TestDescription
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.result.TestDescription |
מחלקה שמייצגת מידע על מקרה בדיקה.
סיכום
שדות | |
|---|---|
public
static
final
Pattern |
PARAMETERIZED_TEST_REGEX
ביטוי רגולרי לפרמטרים של שיטה. |
Constructors ציבוריים | |
|---|---|
TestDescription(String className, String testName)
Constructor |
|
TestDescription(String className, String testName, Annotation... annotations)
Constructor |
|
TestDescription(String className, String testName,
Constructor |
|
methods ציבוריים | |
|---|---|
int
|
compareTo(TestDescription o)
|
static
TestIdentifier
|
convertToIdentifier(TestDescription desc)
יצירת |
static
TestDescription
|
createFromTestIdentifier(TestIdentifier testId)
יצירת |
boolean
|
equals(Object obj)
|
static
TestDescription
|
fromString(String data)
יצירת |
<T extends Annotation>
T
|
getAnnotation(Class<T> annotationType)
|
|
getAnnotations()
|
String
|
getClassName()
מחזירה את שם המחלקה המלא של הבדיקה. |
String
|
getTestName()
הפונקציה מחזירה את שם הבדיקה עם הפרמטרים, אם מדובר בבדיקה עם פרמטרים. |
String
|
getTestNameWithoutParams()
הפונקציה מחזירה את שם הבדיקה ללא פרמטרים (אם מדובר בשיטה עם פרמטרים). |
int
|
hashCode()
|
String
|
toString()
|
שדות
PARAMETERIZED_TEST_REGEX
public static final Pattern PARAMETERIZED_TEST_REGEX
ביטוי רגולרי לפרמטרים של שיטה. לדוגמה: testName[0]
Constructors ציבוריים
TestDescription
public TestDescription (String className,
String testName)Constructor
| פרמטרים | |
|---|---|
className |
String: השם של המחלקה שכוללת את הבדיקה. |
testName |
String: שם הבדיקה (ה-method). |
TestDescription
public TestDescription (String className,
String testName,
Annotation... annotations)Constructor
| פרמטרים | |
|---|---|
className |
String: השם של המחלקה שכוללת את הבדיקה. |
testName |
String: שם הבדיקה (השיטה). |
annotations |
Annotation: רשימה של ERROR(/Annotation) שמשויכים לתרחיש הבדיקה. |
TestDescription
public TestDescription (String className,
String testName,
annotations) Constructor
| פרמטרים | |
|---|---|
className |
String: השם של המחלקה שכוללת את הבדיקה. |
testName |
String: שם הבדיקה (השיטה). |
annotations |
: אוסף של ERROR(/Annotation) שמשויך למקרה הבדיקה. |
methods ציבוריים
convertToIdentifier
public static TestIdentifier convertToIdentifier (TestDescription desc)
יצירת TestIdentifier מתוך TestDescription. הפרמטר הזה שימושי להמרת תיאור במהלך בדיקה.
| פרמטרים | |
|---|---|
desc |
TestDescription: הערך TestDescription להמרה. |
| החזרות | |
|---|---|
TestIdentifier |
ה-TestIdentifier שנוצר עם הערכים של TestDescription. |
createFromTestIdentifier
public static TestDescription createFromTestIdentifier (TestIdentifier testId)
יצירת TestDescription מתוך TestIdentifier. השימוש בהן נועד להקל על ההמרה
משפה אחת לשפה אחרת.
| פרמטרים | |
|---|---|
testId |
TestIdentifier: הערך TestIdentifier להמרה. |
| החזרות | |
|---|---|
TestDescription |
ה-TestDescription שנוצר עם הערכים של TestIdentifier. |
שווה
public boolean equals (Object obj)
| פרמטרים | |
|---|---|
obj |
Object |
| החזרות | |
|---|---|
boolean |
|
fromString
public static TestDescription fromString (String data)
יצירת TestDescription מהייצוג toString()} שלו.
| פרמטרים | |
|---|---|
data |
String: הייצוג של המחרוזת. הפורמט הנדרש: classname#methodname |
| החזרות | |
|---|---|
TestDescription |
ה-TestDescription או null אם לא ניתן לנתח אותו |
getAnnotation
public T getAnnotation (Class<T> annotationType)
| פרמטרים | |
|---|---|
annotationType |
Class |
| החזרות | |
|---|---|
T |
האנוטציה מסוג annotationType שמצורפת לצומת התיאור הזה, או null אם לא קיימת אנוטציה כזו |
getAnnotations
publicgetAnnotations ()
| החזרות | |
|---|---|
|
כל ההערות שמצורפות לצומת התיאור הזה |
getClassName
public String getClassName ()
מחזירה את שם המחלקה המלא של הבדיקה.
| החזרות | |
|---|---|
String |
|
getTestName
public String getTestName ()
הפונקציה מחזירה את שם הבדיקה עם הפרמטרים, אם מדובר בבדיקה עם פרמטרים. מחזירה את השם הרגיל של הבדיקה אם זו לא בדיקה עם פרמטרים.
| החזרות | |
|---|---|
String |
|
getTestNameWithoutParams
public String getTestNameWithoutParams ()
הפונקציה מחזירה את שם הבדיקה ללא פרמטרים (אם מדובר בשיטה עם פרמטרים).
| החזרות | |
|---|---|
String |
|
hashCode
public int hashCode ()
| החזרות | |
|---|---|
int |
|
toString
public String toString ()
| החזרות | |
|---|---|
String |
|