テストの説明

public final class TestDescription
extends Object

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


テスト ケースに関する情報を表すクラス。

まとめ

田畑

public static final Pattern PARAMETERIZED_TEST_REGEX

パラメータ化されたメソッドの正規表現。

パブリック コンストラクター

TestDescription (String className, String testName)

コンストラクタ

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

コンストラクタ

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

コンストラクタ

公開メソッド

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

TestDescriptionからTestIdentifierを作成します。

static TestDescription createFromTestIdentifier (TestIdentifier testId)

TestIdentifierからTestDescriptionを作成します。

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

そのtoString() } 表現からTestDescriptionを作成します。

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

テストの完全修飾クラス名を返します。

String getTestName ()

パラメータ化されたテストの場合、パラメータを含むテストの名前を返します。

String getTestNameWithoutParams ()

パラメーターなしでテストの名前を返します (パラメーター化されたメソッドの場合)。

int hashCode ()
String toString ()

田畑

PARAMETERIZED_TEST_REGEX

public static final Pattern PARAMETERIZED_TEST_REGEX

パラメータ化されたメソッドの正規表現。例: testName[0]

パブリック コンストラクター

テストの説明

public TestDescription (String className, 
                String testName)

コンストラクタ

パラメーター
className String : テストを保持するクラスの名前。

testName String : テスト (メソッド) 名。

テストの説明

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

コンストラクタ

パラメーター
className String : テストを保持するクラスの名前。

testName String : テスト (メソッド) 名。

annotations Annotation : テスト ケースに関連付けられたERROR(/Annotation)のリスト。

テストの説明

public TestDescription (String className, 
                String testName, 
                 annotations)

コンストラクタ

パラメーター
className String : テストを保持するクラスの名前。

testName String : テスト (メソッド) 名。

annotations : テスト ケースに関連付けられたERROR(/Annotation)のコレクション。

公開メソッド

比較する

public int compareTo (TestDescription o)

パラメーター
o TestDescription

戻り値
int

convertToIdentifier

public static TestIdentifier convertToIdentifier (TestDescription desc)

TestDescriptionからTestIdentifierを作成します。テスト中に説明を変換するのに役立ちます。

パラメーター
desc TestDescription : 変換するTestDescription

戻り値
TestIdentifier TestDescription 値を持つ作成されたTestIdentifier

createFromTestIdentifier

public static TestDescription createFromTestIdentifier (TestIdentifier testId)

TestIdentifierからTestDescriptionを作成します。あるものから別のものへの変換を容易にするために使用されます。

パラメーター
testId TestIdentifier : 変換するTestIdentifier

戻り値
TestDescription TestIdentifier 値を持つ作成されたTestDescription

等しい

public boolean equals (Object obj)

パラメーター
obj Object

戻り値
boolean

fromString

public static TestDescription fromString (String data)

そのtoString() } 表現からTestDescriptionを作成します。

パラメーター
data String : 文字列表現。期待される形式: クラス名#メソッド名

戻り値
TestDescription TestDescription または解析できなかった場合は null

getAnnotation

public T getAnnotation (Class<T> annotationType)

パラメーター
annotationType Class

戻り値
Tこの記述ノードにアタッチされたタイプ annotationType のアノテーション、または存在しない場合は null

getAnnotations

public  getAnnotations ()

戻り値
この説明ノードに添付されたすべての注釈

getClassName

public String getClassName ()

テストの完全修飾クラス名を返します。

戻り値
String

getTestName

public String getTestName ()

パラメータ化されたテストの場合、パラメータを含むテストの名前を返します。パラメータ化されたテストでない場合は、通常のテスト名を返します。

戻り値
String

getTestNameWithoutParams

public String getTestNameWithoutParams ()

パラメーターなしでテストの名前を返します (パラメーター化されたメソッドの場合)。

戻り値
String

ハッシュコード

public int hashCode ()

戻り値
int

toString

public String toString ()

戻り値
String