Avoid from accessing Robolectric#setupActivity(). Bug: 140707056 Test: make RunSettingsRoboTests ROBOTEST_FILTER=EuiccPreferenceControllerTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataServiceSetupPreferenceControllerTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=ApnPreferenceControllerTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsagePreferenceControllerTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=SubscriptionsPreferenceControllerTest Change-Id: I8552b181d2dc1c9a5d8aeb0b7e79bbec7252f67e
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.