Skip to content
Commit 6d553f6d authored by Lorenzo Colitti's avatar Lorenzo Colitti
Browse files

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
parent d69a99e3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment