1. Use AndroidJunit4 instead of RobolectricTestRunner 2. Use ApplicationProvider instead of RuntimeEnvironment to get context 3. Change Copy Right 4. remove the mock of PreferenceScreen Bug: 173003522 Test: atest DisabledSubscriptionControllerTest.java Change-Id: Ia99a4cf4618fcb32162485e7da5e48e3b313ce67 Merged-In: Ia99a4cf4618fcb32162485e7da5e48e3b313ce67
Running Settings Robolectric tests
The full suite
$ croot
$ make RunSettingsRoboTests
Running a single test class
$ croot
$ make RunSettingsRoboTests ROBOTEST_FILTER=<ClassName>
For example:
make RunSettingsRoboTests ROBOTEST_FILTER=CodeInspectionTest
You can also use partial class name in ROBOTEST_FILTER. If the partial class name matches multiple file names, all of them will be executed.