Change design to avoid using Robolectric.setupActivity() Bug: 140707056 Test: make RunSettingsRoboTests ROBOTEST_FILTER=EuiccPreferenceControllerTest make RunSettingsRoboTests ROBOTEST_FILTER=DataServiceSetupPreferenceControllerTest make RunSettingsRoboTests ROBOTEST_FILTER=ApnPreferenceControllerTest make RunSettingsRoboTests ROBOTEST_FILTER=MobileNetworkActivityTest make RunSettingsRoboTests ROBOTEST_FILTER=DataUsagePreferenceControllerTest make RunSettingsRoboTests ROBOTEST_FILTER=ApnEditorTest make RunSettingsRoboTests ROBOTEST_FILTER=MobileNetworkSummaryControllerTest make RunSettingsRoboTests ROBOTEST_FILTER=SubscriptionsPreferenceControllerTest make RunSettingsRoboTests ROBOTEST_FILTER=MobileNetworkListControllerTest make RunSettingsRoboTests ROBOTEST_FILTER=MobileNetworkPreferenceControllerTest Change-Id: Ifacd2e6c8733d8e814a277cf34d6f7eb1a9ddba4
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.