Quantcast
Channel: Tomas Nilsson – blog.
Viewing all articles
Browse latest Browse all 20

Using RenamingDelegatingContext to mock ContentResolver in Android

$
0
0

Mocking Context Testing in Android can be complex, especially when your component is not isolated from the Android framework. One example of this is when your component is performing file system tasks using Context. E.g, the Activity class has the following methods (inherited from Context): openOrCreateDatabase(); deleteDatabase(); getDatabasePath(); openFileInput(); openFileOutput(); getFileStreamPath(); deleteFile(); getCacheDir(); When calling […]

The post Using RenamingDelegatingContext to mock ContentResolver in Android appeared first on blog..


Viewing all articles
Browse latest Browse all 20

Trending Articles