FakeTestsZipFolder
public
class
FakeTestsZipFolder
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.FakeTestsZipFolder |
A testing fixture that creates a fake unzipped tests folder based on a list of content.
The folder structure is configured based on a list of file names or folder names, as provided
to the constructor. FakeTestsZipFolder.cleanUp()
should be called after the folder is
no longer needed.
Summary
Public constructors | |
---|---|
FakeTestsZipFolder(
Create a fake unzipped tests folder backed by empty files |
Public methods | |
---|---|
void
|
cleanUp()
Delete the entire fake unzipped test folder |
boolean
|
createItems()
Create fake unzipped tests folder as indicated by the manifest of items |
File
|
getBasePath()
Returns the base of the fake unzipped folder This would be a replacement of root folder where a real tests zip is expanded |
Protected methods | |
---|---|
File
|
getDataFolder()
|
Public constructors
FakeTestsZipFolder
public FakeTestsZipFolder (items)
Create a fake unzipped tests folder backed by empty files
Parameters | |
---|---|
items |
: list of items to include in the fake unzipped folder. key of
the map shall be the relative path of the item, value of the
entry shall indicate if the entry should be backed by an empty
file or a folder |
Public methods
cleanUp
public void cleanUp ()
Delete the entire fake unzipped test folder
createItems
public boolean createItems ()
Create fake unzipped tests folder as indicated by the manifest of items
Returns | |
---|---|
boolean |
false if failed to create any item |
Throws | |
---|---|
|
IOException |
getBasePath
public File getBasePath ()
Returns the base of the fake unzipped folder This would be a replacement of root folder where a real tests zip is expanded
Returns | |
---|---|
File |
Protected methods
getDataFolder
protected File getDataFolder ()
Returns | |
---|---|
File |