Opis testu
public final class TestDescription
extends Object
java.lang.Object |
| com.android.tradefed.result.TestDescription |
Klasa reprezentująca informacje o przypadku testowym.
Streszczenie
Konstruktorzy publiczni |
---|
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
Wyrażenie regularne dla sparametryzowanej metody. Na przykład: nazwatestu[0]
Konstruktorzy publiczni
Opis testu
public TestDescription (String className,
String testName)
Konstruktor
Parametry |
---|
className | String : nazwa klasy przechowującej test. |
testName | String : nazwa testu (metody). |
Opis testu
public TestDescription (String className,
String testName,
Annotation... annotations)
Konstruktor
Parametry |
---|
className | String : nazwa klasy przechowującej test. |
testName | String : nazwa testu (metody). |
annotations | Annotation : Lista ERROR(/Annotation) powiązanych z przypadkiem testowym. |
Opis testu
public TestDescription (String className,
String testName,
annotations)
Konstruktor
Parametry |
---|
className | String : nazwa klasy przechowującej test. |
testName | String : nazwa testu (metody). |
annotations | : Kolekcja ERROR(/Annotation) skojarzona z przypadkiem testowym. |
Metody publiczne
porównać do
public int compareTo (TestDescription o)
Parametry |
---|
o | TestDescription |
równa się
public boolean equals (Object obj)
fromString
public static TestDescription fromString (String data)
Utwórz TestDescription
z jego reprezentacji toString()
}.
Parametry |
---|
data | String : reprezentacja String. Oczekiwany format: nazwaklasy#nazwametody |
Zwroty |
---|
TestDescription | TestDescription lub null, jeśli nie można go przeanalizować |
pobierz adnotację
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 nie istnieje; |
pobierz adnotacje
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 zwykłą nazwę testu, jeśli nie jest to test sparametryzowany.
pobierzNazwęTestuBezParams
public String getTestNameWithoutParams ()
Zwraca nazwę testu bez żadnych parametrów (jeśli jest to metoda sparametryzowana).
hashCode
public int hashCode ()
toString
public String toString ()