Opis testu

public final class TestDescription
extends Object

java.lang.Obiekt
com.android.tradefed.result.TestDescription


Klasa reprezentująca informacje o przypadku testowym.

Streszczenie

Pola

public static final Pattern PARAMETERIZED_TEST_REGEX

Regex dla metody sparametryzowanej.

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

Metody publiczne

int compareTo ( TestDescription o)
static TestIdentifier convertToIdentifier ( TestDescription desc)

Utwórz TestIdentifier z TestDescription .

static TestDescription createFromTestIdentifier (TestIdentifier testId)

Utwórz TestDescription z TestIdentifier .

boolean equals (Object obj)
static TestDescription fromString (String data)

Utwórz TestDescription z jego reprezentacji toString() }.

<T extends Annotation> T getAnnotation (Class<T> annotationType)
getAnnotations ()
String getClassName ()

Zwraca w pełni kwalifikowaną nazwę klasy testu.

String getTestName ()

Zwraca nazwę testu z parametrami, jeśli jest to test sparametryzowany.

String getTestNameWithoutParams ()

Zwraca nazwę testu bez żadnych parametrów (jeśli jest to metoda sparametryzowana).

int hashCode ()
String toString ()

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

Zwroty
int

konwertuj na identyfikator

public static TestIdentifier convertToIdentifier (TestDescription desc)

Utwórz TestIdentifier z TestDescription . Przydatne do konwersji opisu podczas testowania.

Parametry
desc TestDescription : TestDescription do przekonwertowania.

Zwroty
TestIdentifier Utworzony TestIdentifier z wartościami TestDescription.

createFromTestIdentifier

public static TestDescription createFromTestIdentifier (TestIdentifier testId)

Utwórz TestDescription z TestIdentifier . Używany w celu ułatwienia konwersji z jednego na drugi.

Parametry
testId TestIdentifier : TestIdentifier do przekonwertowania.

Zwroty
TestDescription utworzony TestDescription z wartościami TestIdentifier.

równa się

public boolean equals (Object obj)

Parametry
obj Object

Zwroty
boolean

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.

Zwroty
String

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.

Zwroty
String

getTestNameBez parametrów

public String getTestNameWithoutParams ()

Zwraca nazwę testu bez żadnych parametrów (jeśli jest to metoda sparametryzowana).

Zwroty
String

HashCode

public int hashCode ()

Zwroty
int

do Ciągu

public String toString ()

Zwroty
String