TestDescription

public final class TestDescription
extends Object implements Comparable<TestDescription>, Serializable

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


Bir test durumu hakkındaki bilgileri temsil eden sınıf.

Özet

Alanlar

public static final Pattern PARAMETERIZED_TEST_REGEX

Parametrelendirilmiş yöntem için normal ifade.

Herkese açık oluşturucular

TestDescription(String className, String testName)

Marka

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

Marka

TestDescription(String className, String testName, Collection<Annotation> annotations)

Marka

Herkese açık yöntemler

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

TestIdentifier oluşturmaTestDescription

static TestDescription createFromTestIdentifier(TestIdentifier testId)

TestDescription oluşturmaTestIdentifier

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

toString()} gösteriminden TestDescription oluşturun.

<T extends Annotation> T getAnnotation(Class<T> annotationType)
Collection<Annotation> getAnnotations()
String getClassName()

Testin tam nitelikli sınıf adını döndürür.

String getTestName()

Parametreli test ise parametrelerle birlikte testin adını döndürür.

String getTestNameWithoutParams()

Parametresiz testin adını döndürür (parametreli bir yöntemse).

int hashCode()
String toString()

Alanlar

PARAMETERIZED_TEST_REGEX

public static final Pattern PARAMETERIZED_TEST_REGEX

Parametrelendirilmiş yöntem için normal ifade. Örneğin: testName[0]

Herkese açık oluşturucular

TestDescription

public TestDescription (String className, 
                String testName)

Marka

Parametreler
className String: Testi yapan sınıfın adı.

testName String: Testin (yöntemin) adı.

TestDescription

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

Marka

Parametreler
className String: Testi yapan sınıfın adı.

testName String: Testin (yöntemin) adı.

annotations Annotation: Test senaryosuyla ilişkili Annotation listesi.

TestDescription

public TestDescription (String className, 
                String testName, 
                Collection<Annotation> annotations)

Marka

Parametreler
className String: Testi yapan sınıfın adı.

testName String: Testin (yöntemin) adı.

annotations Collection: Test durumuyla ilişkili Annotation koleksiyonu.

Herkese açık yöntemler

compareTo

public int compareTo (TestDescription o)

Parametreler
o TestDescription

İadeler
int

convertToIdentifier

public static TestIdentifier convertToIdentifier (TestDescription desc)

TestIdentifier oluşturmaTestDescription Test sırasında açıklamaları dönüştürmek için kullanışlıdır.

Parametreler
desc TestDescription: Dönüştürülecek TestDescription.

İadeler
TestIdentifier TestDescription değerleriyle oluşturulan TestIdentifier.

createFromTestIdentifier

public static TestDescription createFromTestIdentifier (TestIdentifier testId)

TestDescription oluşturmaTestIdentifier Bir birimden diğerine kolayca dönüştürmek için kullanılır.

Parametreler
testId TestIdentifier: Dönüştürülecek TestIdentifier.

İadeler
TestDescription TestIdentifier değerleriyle oluşturulan TestDescription.

şuna eşittir:

public boolean equals (Object obj)

Parametreler
obj Object

İadeler
boolean

fromString

public static TestDescription fromString (String data)

toString()} gösteriminden TestDescription oluşturun.

Parametreler
data String: Dize gösterimi. Beklenen biçim: classname#methodname

İadeler
TestDescription TestDescription veya ayrıştırılamadıysa null

getAnnotation

public T getAnnotation (Class<T> annotationType)

Parametreler
annotationType Class

İadeler
T Bu açıklama düğümüne eklenmiş annotationType türündeki ek açıklama veya yoksa null

getAnnotations

public Collection<Annotation> getAnnotations ()

İadeler
Collection<Annotation> Bu açıklama düğümüne eklenen tüm ek açıklamalar

getClassName

public String getClassName ()

Testin tam nitelikli sınıf adını döndürür.

İadeler
String

getTestName

public String getTestName ()

Parametreli test ise parametrelerle birlikte testin adını döndürür. Parametreli test değilse normal test adını döndürür.

İadeler
String

getTestNameWithoutParams

public String getTestNameWithoutParams ()

Parametresiz testin adını döndürür (parametreli bir yöntemse).

İadeler
String

hashCode

public int hashCode ()

İadeler
int

toString

public String toString ()

Döndürülenler
String