I am writing my first Android database backend and I\'m struggling to unit test the creation of my database.
Currently the problem I am encountering is obtaining a va
You can derive from MockContext and return for example a MockResources on getResources(), a valid ContentResolver on getContentResolver(), etc. That allows, with some pain, some unit tests.
The alternative is to run for example Robolectric which simulates a whole Android OS. Those would be for system tests: It's a lot slower to run.