Opis testu
public final class TestDescription
extends Object
java.lang.Obiekt |
↳ | com.android.tradefed.result.TestDescription |
Klasa reprezentująca informacje o przypadku testowym.
Streszczenie
Konstruktory publiczne |
---|
TestDescription (String className, String testName) Konstruktor |
TestDescription (String className, String testName, Annotation... annotations) Konstruktor |
TestDescription (String className, String testName, annotations) TestDescription (String className, String testName, annotations) Konstruktor |
Pola
PARAMETERIZED_TEST_REGEX
public static final Pattern PARAMETERIZED_TEST_REGEX
Regex dla metody sparametryzowanej. Na przykład: nazwatestu[0]
Konstruktory publiczne
Opis testu
public TestDescription (String className,
String testName)
Konstruktor
Parametry |
---|
className | String : Nazwa klasy przeprowadzającej test. |
testName | String : Nazwa testu (metody). |
Opis testu
public TestDescription (String className,
String testName,
Annotation... annotations)
Konstruktor
Parametry |
---|
className | String : Nazwa klasy przeprowadzającej test. |
testName | String : Nazwa testu (metody). |
annotations | Annotation : lista ERROR(/Annotation) skojarzonych z przypadkiem testowym. |
Opis testu
public TestDescription (String className,
String testName,
annotations)
Konstruktor
Parametry |
---|
className | String : Nazwa klasy przeprowadzającej test. |
testName | String : Nazwa testu (metody). |
annotations | : Zbiór ERROR(/Annotation) skojarzony z przypadkiem testowym. |
Metody publiczne
porównać do
public int compareTo (TestDescription o)
Parametry |
---|
o | TestDescription |
równa się
public boolean equals (Object obj)
z Ciągu
public static TestDescription fromString (String data)
Utwórz TestDescription
z jego reprezentacji toString()
}.
Parametry |
---|
data | String : reprezentacja ciągu. Oczekiwany format: nazwa klasy#nazwa metody |
Zwroty |
---|
TestDescription | TestDescription lub null, jeśli nie można go przeanalizować |
getAdnotation
public T getAnnotation (Class<T> annotationType)
Parametry |
---|
annotationType | Class |
Zwroty |
---|
T | adnotacja typu annotationType, która jest dołączona do tego węzła opisu, lub null, jeśli żaden nie istnieje |
getAdnotations
public getAnnotations ()
Zwroty |
---|
| wszystkie adnotacje dołączone do tego węzła opisu |
pobierzNazwęKlasy
public String getClassName ()
Zwraca w pełni kwalifikowaną nazwę klasy testu.
pobierzNazwęTestu
public String getTestName ()
Zwraca nazwę testu z parametrami, jeśli jest to test sparametryzowany. Zwraca nazwę zwykłego testu, jeśli nie jest to test sparametryzowany.
getTestNameBez parametrów
public String getTestNameWithoutParams ()
Zwraca nazwę testu bez żadnych parametrów (jeśli jest to metoda sparametryzowana).
HashCode
public int hashCode ()
do Ciągu
public String toString ()