Descrizione del testo
public final class TestDescription
extends Object
java.lang.Oggetto |
↳ | 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 metodo parametrizzato. Ad esempio: NomeProva[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) associato 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 |
equivale
public boolean equals (Object obj)
fromString
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 | 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 oppure 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 parametrico. Restituisce il nome del test normale se non è un test con parametri.
getTestNameWithoutParams
public String getTestNameWithoutParams ()
Restituisce il nome del test senza alcun parametro (se si tratta di un metodo con parametri).
codice hash
public int hashCode ()
accordare
public String toString ()