The MobilieNetworkActivity has MobileNetworkSettings fragment. The MobileNetworkActivityTest do testcases for activity stability. The activity's launch test successful is equals the fragment doesn't crash, so the activity's testcases cover MobileNetworkSettingsTest#onAttach. Bug: 147464840 Test: build pass Change-Id: Idbabb846c40fd117f22a39b86fd6628b7d8c5b1b
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.