TestDescription
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) コンストラクタ |
パブリックメソッド | |
---|---|
static TestIdentifier | convertToIdentifier ( TestDescription desc) |
static TestDescription | createFromTestIdentifier (TestIdentifier testId) |
boolean | equals (Object obj) |
<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]
パブリックコンストラクター
TestDescription
public TestDescription (String className, String testName)
コンストラクタ
パラメーター | |
---|---|
className | String :テストを保持しているクラスの名前。 |
testName | String :テスト(メソッド)名。 |
TestDescription
public TestDescription (String className, String testName, Annotation... annotations)
コンストラクタ
パラメーター | |
---|---|
className | String :テストを保持しているクラスの名前。 |
testName | String :テスト(メソッド)名。 |
annotations | Annotation :テストケースに関連付けられたERROR(/Annotation) リスト。 |
TestDescription
public TestDescription (String className, String testName,annotations)
コンストラクタ
パラメーター | |
---|---|
className | String :テストを保持しているクラスの名前。 |
testName | String :テスト(メソッド)名。 |
annotations | ERROR(/Annotation) コレクション。 |
パブリックメソッド
convertToIdentifier
public static TestIdentifier convertToIdentifier (TestDescription desc)
作成TestIdentifier
からTestDescription
。テスト中に説明を変換するのに便利です。
パラメーター | |
---|---|
desc | TestDescription :変換するTestDescription 。 |
戻り値 | |
---|---|
TestIdentifier | TestDescription値をTestIdentifier して作成されたTestIdentifier 。 |
createFromTestIdentifier
public static TestDescription createFromTestIdentifier (TestIdentifier testId)
作成TestDescription
からTestIdentifier
。あるものから別のものへの変換を容易にするために使用されます。
パラメーター | |
---|---|
testId | TestIdentifier :変換するTestIdentifier 。 |
戻り値 | |
---|---|
TestDescription | TestIdentifier値をTestDescription して作成されたTestDescription 。 |
等しい
public boolean equals (Object obj)
パラメーター | |
---|---|
obj | Object |
戻り値 | |
---|---|
boolean |
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 |