Description du test
public final class TestDescription
extends Object
java.lang.Object |
↳ | com.android.tradefed.result.TestDescription |
Classe représentant des informations sur un cas de test.
Résumé
Constructeurs publics |
---|
TestDescription (String className, String testName) Constructeur |
TestDescription (String className, String testName, Annotation... annotations) Constructeur |
TestDescription (String className, String testName, annotations) TestDescription (String className, String testName, annotations) Constructeur |
Des champs
PARAMETERIZED_TEST_REGEX
public static final Pattern PARAMETERIZED_TEST_REGEX
Regex pour la méthode paramétrée. Par exemple : testName[0]
Constructeurs publics
Description du test
public TestDescription (String className,
String testName)
Constructeur
Paramètres |
---|
className | String : Le nom de la classe contenant le test. |
testName | String : nom du test (méthode). |
Description du test
public TestDescription (String className,
String testName,
Annotation... annotations)
Constructeur
Paramètres |
---|
className | String : Le nom de la classe contenant le test. |
testName | String : nom du test (méthode). |
annotations | Annotation : Liste des ERROR(/Annotation) associées au cas de test. |
Description du test
public TestDescription (String className,
String testName,
annotations)
Constructeur
Paramètres |
---|
className | String : Le nom de la classe contenant le test. |
testName | String : nom du test (méthode). |
annotations | : Collection de ERROR(/Annotation) associée au cas de test. |
Méthodes publiques
comparer aux
public int compareTo (TestDescription o)
Paramètres |
---|
o | TestDescription |
équivaut à
public boolean equals (Object obj)
fromString
public static TestDescription fromString (String data)
Créez une TestDescription
à partir de sa représentation toString()
}.
Paramètres |
---|
data | String : la représentation String. Format attendu : nom de classe#nom de méthode |
Retour |
---|
TestDescription | la TestDescription ou null si elle n'a pas pu être analysée |
obtenirAnnotation
public T getAnnotation (Class<T> annotationType)
Paramètres |
---|
annotationType | Class |
Retour |
---|
T | l'annotation de type annotationType qui est attachée à ce nœud de description, ou null s'il n'en existe pas |
getAnnotations
public getAnnotations ()
Retour |
---|
| toutes les annotations attachées à ce nœud de description |
getClassName
public String getClassName ()
Renvoie le nom de classe complet du test.
obtenirNomTest
public String getTestName ()
Renvoie le nom du test avec les paramètres, s'il s'agit d'un test paramétré. Renvoie le nom du test normal s'il ne s'agit pas d'un test paramétré.
getTestNameWithoutParams
public String getTestNameWithoutParams ()
Renvoie le nom du test sans aucun paramètre (s'il s'agit d'une méthode paramétrée).
hashCode
public int hashCode ()
toString
public String toString ()