Description du test
public final class TestDescription
extends Object
java.lang.Object |
↳ | com.android.tradefed.result.TestDescription |
Classe représentant des informations sur un scénario 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 : nom_test[0]
Constructeurs publics
Description du test
public TestDescription (String className,
String testName)
Constructeur
Paramètres |
---|
className | String : Le nom de la classe détenant le test. |
testName | String : Le 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 détenant le test. |
testName | String : Le nom du test (méthode). |
annotations | Annotation : Liste des ERROR(/Annotation) associées au scénario de test. |
Description du test
public TestDescription (String className,
String testName,
annotations)
Constructeur
Paramètres |
---|
className | String : Le nom de la classe détenant le test. |
testName | String : Le nom du test (méthode). |
annotations | : Collection d' ERROR(/Annotation) associée au scénario de test. |
Méthodes publiques
comparer aux
public int compareTo (TestDescription o)
Paramètres |
---|
o | TestDescription |
équivaut à
public boolean equals (Object obj)
deChaîne
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 | le TestDescription ou null s'il n'a pas pu être analysé |
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 |
obtenirAnnotations
public getAnnotations ()
Retour |
---|
| toutes les annotations attachées à ce nœud de description |
obtenirNomClasse
public String getClassName ()
Renvoie le nom de classe complet du test.
getTestName
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).
Code de hachage
public int hashCode ()
versChaîne
public String toString ()