artem-zinnatullin / qualitymatters

Android Development Culture

Home Page:https://artemzin.com/blog/android-development-culture-the-document-qualitymatters/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get rid of Robolectric on DeveloperSettingsTest

lenguyenthanh opened this issue · comments

As I see we are using Robolectric to test DeveloperSetting class because DeveloperSetting needs an instance of SharedPreferences.

Instead of user Robolectric to get SharedPreferences instance we can use some kind of mock or in memory Shared preferences. In my opinion, It will be better approach than using Robolectric.

Or we can use this instead of SharedPreferences directly on DeveloperSetting class. It will make mocking stuffs easy.

#53 is basically saying the same

Thanks @vanniktech for reminding me, I joined #53 conversation too, but totally forgot.
Has any PR for it yet?

AFAIK not yet

Yup, let's close this as duplicate and fix #53 :)