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 5. onPreferenceClick_startsIntent test case was changed Bug: 173332890 Test: atest DeleteSimProfilePreferenceControllerTest Change-Id: Ia7cde5a1da23fd976d99432faa8526c7aa0bf97f
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.