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: 173340087 Test: atest CarrierPreferenceControllerTest Change-Id: Ia0dcc9db5e99626ce0f410d62d16089e0f75e123
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.