TestDescription

public final class TestDescription
extends Object

java.lang.Object
   ↳ com.android.tradefed.result.TestDescription


הכיתה מייצגת מידע על מקרה בדיקה.

סיכום

שדות

public static final Pattern PARAMETERIZED_TEST_REGEX

ביטוי רגולרי ל-method עם פרמטרים.

קונסטרוקטורים גלויים לכולם

TestDescription(String className, String testName)

יוצר

TestDescription(String className, String testName, Annotation... annotations)

יוצר

TestDescription(String className, String testName, annotations)

יוצר

שיטות ציבוריות

int compareTo(TestDescription o)
static TestIdentifier convertToIdentifier(TestDescription desc)

יוצרים TestIdentifier מ-TestDescription.

static TestDescription createFromTestIdentifier(TestIdentifier testId)

יוצרים TestDescription מ-TestIdentifier.

boolean equals(Object obj)
static TestDescription fromString(String data)

יצירת TestDescription מהייצוג toString()} שלו.

<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

ביטוי רגולרי ל-method עם פרמטרים. לדוגמה: testName[0]

קונסטרוקטורים גלויים לכולם

TestDescription

public TestDescription (String className, 
                String testName)

יוצר

פרמטרים
className String: השם של הכיתה שבה נמצא המבחן.

testName String: שם הבדיקה (ה-method).

TestDescription

public TestDescription (String className, 
                String testName, 
                Annotation... annotations)

יוצר

פרמטרים
className String: השם של הכיתה שבה נמצא המבחן.

testName String: שם הבדיקה (ה-method).

annotations Annotation: רשימה של ERROR(/Annotation) המשויכים לתרחיש הבדיקה.

TestDescription

public TestDescription (String className, 
                String testName, 
                 annotations)

יוצר

פרמטרים
className String: השם של הכיתה שבה נמצא המבחן.

testName String: שם הבדיקה (ה-method).

annotations : אוסף של ERROR(/Annotation) שמשויך למקרה הבדיקה.

שיטות ציבוריות

compareTo

public int compareTo (TestDescription o)

פרמטרים
o TestDescription

החזרות
int

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

public  getAnnotations ()

החזרות
כל ההערות שמצורפות לצומת התיאורים הזה

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