Skip to content

Most visited

Recently visited

navigation
Added in API level 1

android.test.mock

Utility classes providing stubs or mocks of various Android framework building blocks.

For more information, see the Testing guide.

Classes

MockApplication A mock Application class. 
MockContentProvider Mock implementation of ContentProvider. 
MockContentResolver

An extension of ContentResolver that is designed for testing. 

MockContext A mock Context class. 
MockCursor

A mock Cursor class that isolates the test code from real Cursor implementation. 

MockDialogInterface A mock DialogInterface class. 
MockPackageManager A mock PackageManager class. 
MockResources A mock Resources class. 
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.