Android.Test.Mock Namespace
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Utility classes providing stubs or mocks of various Android framework building blocks.
Classes
| Name | Description |
|---|---|
| MockApplication |
A mock |
| MockContentProvider |
Mock implementation of ContentProvider. |
| MockContentResolver |
An extension of |
| MockContext |
A mock |
| MockCursor |
A mock |
| MockDialogInterface |
A mock |
| MockDialogInterface.InterfaceConsts |
Exposes the dialog button constants from IDialogInterface. |
| MockPackageManager |
A mock |
| MockResources |
A mock |
Remarks
This namespace supplies mock implementations of Android framework classes. Subclasses can override the operations needed by a test. Most mock operations throw UnsupportedOperationException until overridden. MockContentResolver instead resolves providers from its local map and ignores change notifications. MockResources.UpdateConfiguration does nothing.
Implementation source: Android framework mock classes.