テストの説明
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) |
static TestDescription | createFromTestIdentifier (TestIdentifier testId) |
boolean | equals (Object obj) |
static TestDescription | fromString (String data) その |
<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) のコレクション。 |
公開メソッド
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
publicgetAnnotations ()
戻り値 | |
---|---|
この説明ノードに添付されたすべての注釈 |
getClassName
public String getClassName ()
テストの完全修飾クラス名を返します。
戻り値 | |
---|---|
String |
getTestName
public String getTestName ()
パラメータ化されたテストの場合、パラメータを含むテストの名前を返します。パラメータ化されたテストでない場合は、通常のテスト名を返します。
戻り値 | |
---|---|
String |
getTestNameWithoutParams
public String getTestNameWithoutParams ()
パラメーターなしでテストの名前を返します (パラメーター化されたメソッドの場合)。
戻り値 | |
---|---|
String |
ハッシュコード
public int hashCode ()
戻り値 | |
---|---|
int |
toString
public String toString ()
戻り値 | |
---|---|
String |