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, コンストラクタ | |
| パブリック メソッド | |
|---|---|
| 
        
        
        
        
        
        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]
パブリック コンストラクタ
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)
TestDescription から TestIdentifier を作成します。テスト中に説明を変換する場合に便利です。
| パラメータ | |
|---|---|
| desc | TestDescription: 変換するTestDescription。 | 
| 戻り値 | |
|---|---|
| TestIdentifier | TestDescription 値を持つ作成された TestIdentifier。 | 
createFromTestIdentifier
public static TestDescription createFromTestIdentifier (TestIdentifier testId)
TestIdentifier から TestDescription を作成します。1 つの形式から別の形式への変換を容易にするために使用されます。
| パラメータ | |
|---|---|
| testId | TestIdentifier: 変換するTestIdentifier。 | 
| 戻り値 | |
|---|---|
| TestDescription | 作成した TestDescriptionを TestIdentifier 値で置き換えます。 | 
equals
public boolean equals (Object obj)
| パラメータ | |
|---|---|
| obj | Object | 
| 戻り値 | |
|---|---|
| boolean | |
fromString
public static TestDescription fromString (String data)
toString()} 表現から TestDescription を作成します。
| パラメータ | |
|---|---|
| data | String: 文字列表現。適切な形式: classname#methodname | 
| 戻り値 | |
|---|---|
| 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 | |
hashCode
public int hashCode ()
| 戻り値 | |
|---|---|
| int | |
toString
public String toString ()
| 戻り値 | |
|---|---|
| String | |
