TestDescription

public final class TestDescription
extends Object

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


Klasa reprezentująca informacje o przypadku testowym.

Podsumowanie

Fieldsem

public static final Pattern PARAMETERIZED_TEST_REGEX

Wyrażenie regularne dla parametru metody.

Konstruktory publiczne

TestDescription(String className, String testName)

Konstruktor

TestDescription(String className, String testName, Annotation... annotations)

Konstruktor

TestDescription(String className, String testName, annotations)

Konstruktor

Metody publiczne

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

Utwórz TestIdentifier na podstawie TestDescription.

static TestDescription createFromTestIdentifier(TestIdentifier testId)

Utwórz TestDescription na podstawie TestIdentifier.

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

Utwórz TestDescription na podstawie reprezentacji toString()}.

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

Zwraca pełną nazwę klasy testu.

String getTestName()

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

String getTestNameWithoutParams()

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

int hashCode()
String toString()

Fieldsem

PARAMETERIZED_TEST_REGEX

public static final Pattern PARAMETERIZED_TEST_REGEX

Wyrażenie regularne dla parametru metody. Na przykład: nazwaTestu[0]

Konstruktory publiczne

TestDescription

public TestDescription (String className, 
                String testName)

Konstruktor

Parametry
className String: nazwa klasy, która zawiera test.

testName String: nazwa testu (metody).

TestDescription

public TestDescription (String className, 
                String testName, 
                Annotation... annotations)

Konstruktor

Parametry
className String: nazwa klasy, która zawiera test.

testName String: nazwa testu (metody).

annotations Annotation: lista ERROR(/Annotation) powiązanych z przypadkiem testowym.

TestDescription

public TestDescription (String className, 
                String testName, 
                 annotations)

Konstruktor

Parametry
className String: nazwa klasy, która zawiera test.

testName String: nazwa testu (metody).

annotations : zbiór ERROR(/Annotation) powiązanych z przypadkiem testowym.

Metody publiczne

compareTo

public int compareTo (TestDescription o)

Parametry
o TestDescription

Zwroty
int

convertToIdentifier

public static TestIdentifier convertToIdentifier (TestDescription desc)

Utwórz TestIdentifier na podstawie TestDescription. Przydatne podczas testowania do konwertowania opisu.

Parametry
desc TestDescription: konwertowana wartość TestDescription.

Zwroty
TestIdentifier Utworzony TestIdentifier z wartościami TestDescription.

createFromTestIdentifier

public static TestDescription createFromTestIdentifier (TestIdentifier testId)

Utwórz TestDescription na podstawie TestIdentifier. Służy do łatwego przekształcania jednego typu w drugi.

Parametry
testId TestIdentifier: konwertowana wartość TestIdentifier.

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 na podstawie reprezentacji toString()}.

Parametry
data String: reprezentacja ciągu znaków. Oczekiwany format: nazwa_klasy#nazwa_metody

Zwroty
TestDescription TestDescription lub wartość null, jeśli nie udało się przeanalizować opisu

getAnnotation

public T getAnnotation (Class<T> annotationType)

Parametry
annotationType Class

Zwroty
T adnotacja typu annotationType dołączona do tego węzła opisu lub null, jeśli nie istnieje

getAnnotations

public  getAnnotations ()

Zwroty
wszystkie adnotacje dołączone do tego węzła opisu.

getClassName

public String getClassName ()

Zwraca pełną nazwę klasy testu.

Zwroty
String

getTestName

public String getTestName ()

Zwraca nazwę testu z parametrami, jeśli jest to test parametryczny. Zwraca nazwę testu, jeśli nie jest to test parametryzowany.

Zwroty
String

getTestNameWithoutParams

public String getTestNameWithoutParams ()

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

Zwroty
String

hashCode

public int hashCode ()

Zwroty
int

toString

public String toString ()

Zwroty
String