Unit Test android.provider -
i'm trying provide 100% test coverage , stuck on android methods, example:
public static boolean aremocklocationsenabled(context context) { return settings.secure.getstring(context.getcontentresolver(), settings.secure.allow_mock_location).equals("1"); } i can't mock settings because it's using android.provider , not passed in. i've read providertestcase2 can't find many examples. there way mock or inject these android system settings?
Comments
Post a Comment