Add a FakeSettingsProvider and use it in ConnectivityServiceTest.
This class makes it easier to test code that uses Settings: 1. Real device or emulator settings don't affect the code under test; all settings always start off empty. 2. It's possible to change settings from the test without affecting system settings. 3. No changes are needed to the code under test. The changes to the tests are simple: just add a fake ContentResolver to whatever mock Context is already used by the test, and make that ContentResolver use the fake provider. Bug: 23113288 Change-Id: I5e7e5a87571444ae49ccf551705620675a36cd17
Loading
Please register or sign in to comment