テストの説明

public final class TestDescription
extends Object

java.lang.オブジェクト
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

パラメータ化されたメソッドの正規表現。例: テスト名[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

識別子に変換

public static TestIdentifier convertToIdentifier (TestDescription desc)

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

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

戻り値
TestIdentifier作成されたTestIdentifierと TestDescription の値。

createFromTestIdentifier

public static TestDescription createFromTestIdentifier (TestIdentifier testId)

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

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

戻り値
TestDescription作成されたTestDescriptionと TestIdentifier 値。

等しい

public boolean equals (Object obj)

パラメーター
obj Object

戻り値
boolean

fromString

public static TestDescription fromString (String data)

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

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

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

getアノテーション

public T getAnnotation (Class<T> annotationType)

パラメーター
annotationType Class

戻り値
Tこの説明ノードにアタッチされているタイプ annotationType の注釈、または存在しない場合は null

getアノテーション

public  getAnnotations ()

戻り値
この説明ノードにアタッチされたすべての注釈

getクラス名

public String getClassName ()

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

戻り値
String

getテスト名

public String getTestName ()

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

戻り値
String

getTestNameWithoutParams

public String getTestNameWithoutParams ()

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

戻り値
String

ハッシュコード

public int hashCode ()

戻り値
int

toString

public String toString ()

戻り値
String