Closed kar closed 6 years ago
I believe Paper shouldn't be involved in unit tests by any means. You should provide your custom class incapsulating Paper DB calls (e.g. DataProvider
) and mock it in your tests. Same happens with any other Android API (Location API, SharedPreferences, SQLite etc) – you need an wrapper class around its API to be mocked.
As you test unit - you should test only your unit (class) without any third party dependency involved.
Hi! It seems like Paper can't be used in unit tests because of it's Android dependency. Any chance of making it possible to init Paper in "test mode"?