lightbulb_outline Please take our October 2018 developer survey. Start survey
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

MockAccountManager This class is deprecated. Use a mocking framework like Mockito. New tests should be written using the Android Testing Support Library.  
MockApplication This class was deprecated in API level 24. Use a mocking framework like Mockito. New tests should be written using the Android Testing Support Library.  
MockContentProvider Mock implementation of ContentProvider. 
MockContentResolver

An extension of ContentResolver that is designed for testing. 

MockContext A mock Context class. 
MockCursor This class was deprecated in API level 24. Use a mocking framework like Mockito. New tests should be written using the Android Testing Support Library.  
MockDialogInterface This class was deprecated in API level 24. Use a mocking framework like Mockito. New tests should be written using the Android Testing Support Library.  
MockPackageManager This class was deprecated in API level 24. Use a mocking framework like Mockito. New tests should be written using the Android Testing Support Library.  
MockResources This class was deprecated in API level 24. Use a mocking framework like Mockito. New tests should be written using the Android Testing Support Library.  
MockService This class is deprecated. Use a mocking framework like Mockito. New tests should be written using the Android Testing Support Library.