Enable controllers to use a custom key.

Test: atest SettingsUnitTests
Test: m -j45 RunSettingsRoboTests
Bug: 191763369
Change-Id: I48eea95613600580c80c8850f0a3fd543a7e0a43
This commit is contained in:
Jan Tomljanovic
2021-06-25 01:45:30 +01:00
parent 37b1831d0d
commit c6667337ca
18 changed files with 171 additions and 27 deletions

View File

@@ -98,4 +98,18 @@ public class LockUnificationPreferenceControllerTest {
assertThat(mController.isAvailable()).isTrue();
}
@Test
public void getPreferenceKey_byDefault_returnsDefaultValue() {
init();
assertThat(mController.getPreferenceKey()).isEqualTo("unification");
}
@Test
public void getPreferenceKey_whenGivenValue_returnsGivenValue() {
mController = new LockUnificationPreferenceController(mContext, mHost, "key");
assertThat(mController.getPreferenceKey()).isEqualTo("key");
}
}