android / android/android-test
ProviderTestRule option to use non-mocked ContentResolver
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 342
- Avg merge
- 11h 29m
- Merged PRs (30d)
- 2
Description
### Description
For research and development, I want to write tests that explore the behavior of content-change notifications my ContentProvider sends via ContentResolver.notifyChange(). This is not possible with ProviderTestRule, as MockContentResolver has empty implementation for notifyChange().
### Request
Please extend ProviderTestRule with an option to use a real ContentResolver in place of MockContentResolver.
### Background
My ContentProvider is providing a client-side helper API for accessing content, and this implementation relies in part on content-change notifications from my ContentProvider. I need to be able to test those interactions in a testing context.
Contributor guide
Research direction
Start by reading ProviderTestRule and MockContentResolver, then trace how the rule creates and exposes its resolver. Done means an opt-in path can use a real ContentResolver for content-change notification tests while the existing mocked behavior remains available by default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile-dev, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100