com.android.testutils
Class SdkTestCase.TestFile

java.lang.Object
  extended by com.android.testutils.SdkTestCase.TestFile
Enclosing class:
SdkTestCase

public class SdkTestCase.TestFile
extends java.lang.Object

Test file description, which can copy from resource directory or from a specified hardcoded string literal, and copy into a target directory


Field Summary
 java.lang.String contents
           
 java.lang.String sourceRelativePath
           
 java.lang.String targetRelativePath
           
 
Constructor Summary
SdkTestCase.TestFile()
           
 
Method Summary
 SdkTestCase.TestFile copy(java.lang.String relativePath)
           
 java.io.File createFile(java.io.File targetDir)
           
 SdkTestCase.TestFile from(java.lang.String from)
           
 java.lang.String getContents()
           
 SdkTestCase.TestFile to(java.lang.String to)
           
 SdkTestCase.TestFile withSource(java.lang.String source)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sourceRelativePath

public java.lang.String sourceRelativePath

targetRelativePath

public java.lang.String targetRelativePath

contents

public java.lang.String contents
Constructor Detail

SdkTestCase.TestFile

public SdkTestCase.TestFile()
Method Detail

withSource

public SdkTestCase.TestFile withSource(@NonNull
                                       java.lang.String source)

from

public SdkTestCase.TestFile from(@NonNull
                                 java.lang.String from)

to

public SdkTestCase.TestFile to(@NonNull
                               java.lang.String to)

copy

public SdkTestCase.TestFile copy(@NonNull
                                 java.lang.String relativePath)

createFile

@NonNull
public java.io.File createFile(@NonNull
                                       java.io.File targetDir)
                        throws java.io.IOException
Throws:
java.io.IOException

getContents

@Nullable
public java.lang.String getContents()