public class

FakeTestsZipFolder

extends Object
java.lang.Object
   ↳ com.android.tradefed.util.FakeTestsZipFolder

Class Overview

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. cleanUp() should be called after the folder is no longer needed.

Summary

Nested Classes
enum FakeTestsZipFolder.ItemType  
Public Constructors
FakeTestsZipFolder(Map<String, FakeTestsZipFolder.ItemType> items)
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()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public FakeTestsZipFolder (Map<String, FakeTestsZipFolder.ItemType> 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

public void cleanUp ()

Delete the entire fake unzipped test folder

public boolean createItems ()

Create fake unzipped tests folder as indicated by the manifest of items

Returns
  • false if failed to create any item
Throws
IOException

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

Protected Methods

protected File getDataFolder ()