Zadbaj o dobrą organizację dzięki kolekcji Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.

Opis testu

public final class TestDescription
extends Object

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


Klasa reprezentująca informacje o przypadku testowym.

Streszczenie

Pola

public static final Pattern PARAMETERIZED_TEST_REGEX

Wyrażenie regularne dla sparametryzowanej metody.

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

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

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

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 . Służy do łatwej 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

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.

Zwroty
String

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.

Zwroty
String

pobierzNazwęTestuBezParams

public String getTestNameWithoutParams ()

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

Zwroty
String

hashCode

public int hashCode ()

Zwroty
int

toString

public String toString ()

Zwroty
String