Root cause: There is a bunch of different logic of preferences in CaptionMoreOptionsFragment. It’s hard to implement new features and hard to maintain and hard to be testable. Solution: Move out different logic of CaptionMoreOptionsFragment into controllers to reduce the complexity of the relationship between preference and fragment. Bug: 197695932 Test: make RunSettingsRoboTests ROBOTEST_FILTER=CaptionMoreOptionsFragmentTest CaptionLocalePreferenceControllerTest Change-Id: Ifdf3e22b027328a9f8eb13d756730ca047ece047
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.