Test açıklaması
public final class TestDescription
extends Object
java.lang.Object | |
↳ | com.android.tradefed.result.TestDescription |
Bir test senaryosu hakkındaki bilgileri temsil eden sınıf.
Özet
alanlar | |
---|---|
public static final Pattern | PARAMETERIZED_TEST_REGEX Parametreli yöntem için normal ifade. |
kamu inşaatçılar | |
---|---|
TestDescription (String className, String testName) Yapıcı | |
TestDescription (String className, String testName, Annotation... annotations) Yapıcı | |
TestDescription (String className, String testName, annotations) TestDescription (String className, String testName, annotations) Yapıcı |
Genel yöntemler | |
---|---|
int | compareTo ( TestDescription o) |
static TestIdentifier | convertToIdentifier ( TestDescription desc) Bir |
static TestDescription | createFromTestIdentifier (TestIdentifier testId) Bir |
boolean | equals (Object obj) |
static TestDescription | fromString (String data) |
<T extends Annotation> T | getAnnotation (Class<T> annotationType) |
getAnnotations () | |
String | getClassName () Testin tam nitelikli sınıf adını döndürür. |
String | getTestName () Parametreli test ise, testin adını parametrelerle döndürür. |
String | getTestNameWithoutParams () Herhangi bir parametre olmadan testin adını döndürür (eğer parametreleştirilmiş bir yöntemse). |
int | hashCode () |
String | toString () |
alanlar
PARAMETERIZED_TEST_REGEX
public static final Pattern PARAMETERIZED_TEST_REGEX
Parametreli yöntem için normal ifade. Örneğin: testAdı[0]
kamu inşaatçılar
Test açıklaması
public TestDescription (String className, String testName)
Yapıcı
parametreler | |
---|---|
className | String : Testi yapan sınıfın adı. |
testName | String : Test (yöntem) adı. |
Test açıklaması
public TestDescription (String className, String testName, Annotation... annotations)
Yapıcı
parametreler | |
---|---|
className | String : Testi yapan sınıfın adı. |
testName | String : Test (yöntem) adı. |
annotations | Annotation : Test durumuyla ilişkili ERROR(/Annotation) listesi. |
Test açıklaması
public TestDescription (String className, String testName,annotations)
Yapıcı
parametreler | |
---|---|
className | String : Testi yapan sınıfın adı. |
testName | String : Test (yöntem) adı. |
annotations | ERROR(/Annotation) koleksiyonu. |
Genel yöntemler
dönüştürücüTanımlayıcı
public static TestIdentifier convertToIdentifier (TestDescription desc)
Bir TestDescription
bir TestIdentifier
oluşturun. Test sırasında bir açıklamayı 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)
Bir TestIdentifier
bir TestDescription
oluşturun. Birinden diğerine dönüştürme kolaylığı için kullanılır.
parametreler | |
---|---|
testId | TestIdentifier : Dönüştürülecek TestIdentifier . |
İadeler | |
---|---|
TestDescription | TestIdentifier değerleri ile oluşturulan TestDescription . |
eşittir
public boolean equals (Object obj)
parametreler | |
---|---|
obj | Object |
İadeler | |
---|---|
boolean |
Dizeden
public static TestDescription fromString (String data)
toString()
} temsilinden bir TestDescription
oluşturun.
parametreler | |
---|---|
data | String : String gösterimi. Beklenen biçim: sınıfadı#yöntemadı |
İadeler | |
---|---|
TestDescription | TestDescription veya çözümlenemezse null |
ek açıklama al
public T getAnnotation (Class<T> annotationType)
parametreler | |
---|---|
annotationType | Class |
İadeler | |
---|---|
T | bu açıklama düğümüne eklenmiş annotationType türü ek açıklaması veya hiçbiri yoksa null |
ek açıklamaları al
publicgetAnnotations ()
İadeler | |
---|---|
bu açıklama düğümüne eklenen tüm ek açıklamalar |
getSınıfAdı
public String getClassName ()
Testin tam nitelikli sınıf adını döndürür.
İadeler | |
---|---|
String |
getTestName
public String getTestName ()
Parametreli test ise, testin adını parametrelerle döndürür. Parametreli bir test değilse normal test adını döndürür.
İadeler | |
---|---|
String |
getTestNameWithoutParams
public String getTestNameWithoutParams ()
Herhangi bir parametre olmadan testin adını döndürür (eğer parametreleştirilmiş bir yöntemse).
İadeler | |
---|---|
String |
hash kodu
public int hashCode ()
İadeler | |
---|---|
int |
toString
public String toString ()
İadeler | |
---|---|
String |