Peter Serwylo 97cc279d99 Fix unit tests to work with a singleton DBHelper instance.
The fix for the database locking bug was to have a singleton
`DBHelper` instance. This breaks tests because multiple tests
share the same database. The solution is to:

 * Hack together a static method which clears the singleton,
   then invoke it in the `setUp()` method for relevant test cases.

 * Ensure the mock context provided to the providers during
   the tests is able to provide a context via `getApplicationContext()`.
   Without this, the mock context throws an `UnsupportedOperationException`
   when invoking this method.
2016-01-26 22:23:41 +11:00
..