Descrizione del testo
public final class TestDescription
extends Object
java.lang.Object |
↳ | com.android.tradefed.result.TestDescription |
Classe che rappresenta le informazioni su un test case.
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 tiene 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 tiene il test. |
testName | String : il nome del test (metodo). |
annotations | Annotation : elenco di ERROR(/Annotation) associati al test case. |
Descrizione del testo
public TestDescription (String className,
String testName,
annotations)
Costruttore
Parametri |
---|
className | String : il nome della classe che tiene il test. |
testName | String : il nome del test (metodo). |
annotations | : Raccolta di ERROR(/Annotation) associata al test case. |
Metodi pubblici
Paragonare a
public int compareTo (TestDescription o)
Parametri |
---|
o | TestDescription |
è uguale a
public boolean equals (Object obj)
daStringa
public static TestDescription fromString (String data)
Crea una TestDescription
dalla sua rappresentazione toString()
}.
Parametri |
---|
data | String : la rappresentazione String. Formato previsto: nomeclasse#nomemetodo |
ritorna |
---|
TestDescription | il TestDescription o null se non è stato possibile analizzarlo |
getAnnotation
public T getAnnotation (Class<T> annotationType)
Parametri |
---|
annotationType | Class |
ritorna |
---|
T | l'annotazione di tipo annotationType collegata a questo nodo di descrizione o null se non esiste |
getAnnotations
public getAnnotations ()
ritorna |
---|
| tutte le annotazioni allegate a questo nodo di descrizione |
getClassName
public String getClassName ()
Restituisce il nome completo della classe del test.
getTestName
public String getTestName ()
Restituisce il nome del test con i parametri, se è test parametrizzato. Restituisce il nome del test regolare se non un test parametrizzato.
getTestNameWithoutParams
public String getTestNameWithoutParams ()
Restituisce il nome del test senza alcun parametro (se si tratta di un metodo parametrizzato).
codice hash
public int hashCode ()
accordare
public String toString ()