Descrizione del testo
public final class TestDescription
extends Object
java.lang.Object |
↳ | com.android.tradefed.result.TestDescription |
Classe che rappresenta le informazioni su un caso di test.
Riepilogo
Costruttori pubblici |
---|
TestDescription (String className, String testName) Costruttore |
TestDescription (String className, String testName, Annotation... annotations) Costruttore |
TestDescription (String className, String testName, annotations) TestDescription (String className, String testName, annotations) Costruttore |
Campi
PARAMETERIZED_TEST_REGEX
public static final Pattern PARAMETERIZED_TEST_REGEX
Regex per il metodo parametrizzato. Ad esempio: testName[0]
Costruttori pubblici
Descrizione del testo
public TestDescription (String className,
String testName)
Costruttore
Parametri |
---|
className | String : il nome della classe che sostiene il test. |
testName | String : il nome del test (metodo). |
Descrizione del testo
public TestDescription (String className,
String testName,
Annotation... annotations)
Costruttore
Parametri |
---|
className | String : il nome della classe che sostiene il test. |
testName | String : il nome del test (metodo). |
annotations | Annotation : elenco di ERROR(/Annotation) associati al caso di test. |
Descrizione del testo
public TestDescription (String className,
String testName,
annotations)
Costruttore
Parametri |
---|
className | String : il nome della classe che sostiene il test. |
testName | String : il nome del test (metodo). |
annotations | : Raccolta di ERROR(/Annotation) associati al test case. |
Metodi pubblici
Paragonare a
public int compareTo (TestDescription o)
Parametri |
---|
o | TestDescription |
equivale
public boolean equals (Object obj)
daString
public static TestDescription fromString (String data)
Crea una TestDescription
dalla sua rappresentazione toString()
}.
Parametri |
---|
data | String : la rappresentazione della stringa. Formato previsto: nomeclasse#nomemetodo |
ritorna |
---|
TestDescription | il TestDescription o null se non è stato possibile analizzarlo |
getAnnotazione
public T getAnnotation (Class<T> annotationType)
Parametri |
---|
annotationType | Class |
ritorna |
---|
T | l'annotazione di tipo annotationType allegata a questo nodo di descrizione oppure null se non ne esiste alcuna |
getAnnotations
public getAnnotations ()
ritorna |
---|
| tutte le annotazioni allegate a questo nodo descrittivo |
getClassName
public String getClassName ()
Restituisce il nome completo della classe del test.
getNomeTest
public String getTestName ()
Restituisce il nome del test con i parametri, se è un test parametrizzato. Restituisce il nome del test normale se non è un test con parametri.
getNomeTestSenzaParams
public String getTestNameWithoutParams ()
Restituisce il nome del test senza parametri (se è un metodo con parametri).
codice hash
public int hashCode ()
accordare
public String toString ()