Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
Added in API level 1
package

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.