Loading services/tests/mockingservicestests/src/com/android/server/testables/TestableDeviceConfigTest.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -122,6 +122,12 @@ public class TestableDeviceConfigTest { properties = DeviceConfig.getProperties(sNamespace, sKey, newKey); properties = DeviceConfig.getProperties(sNamespace, sKey, newKey); assertThat(properties.getString(sKey, null)).isEqualTo(sValue); assertThat(properties.getString(sKey, null)).isEqualTo(sValue); assertThat(properties.getString(newKey, null)).isEqualTo(newValue); assertThat(properties.getString(newKey, null)).isEqualTo(newValue); String unsetKey = "key3"; properties = DeviceConfig.getProperties(sNamespace, newKey, unsetKey); assertThat(properties.getKeyset()).containsExactly(newKey, unsetKey); assertThat(properties.getString(newKey, null)).isEqualTo(newValue); assertThat(properties.getString(unsetKey, null)).isNull(); } } @Test @Test Loading Loading
services/tests/mockingservicestests/src/com/android/server/testables/TestableDeviceConfigTest.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -122,6 +122,12 @@ public class TestableDeviceConfigTest { properties = DeviceConfig.getProperties(sNamespace, sKey, newKey); properties = DeviceConfig.getProperties(sNamespace, sKey, newKey); assertThat(properties.getString(sKey, null)).isEqualTo(sValue); assertThat(properties.getString(sKey, null)).isEqualTo(sValue); assertThat(properties.getString(newKey, null)).isEqualTo(newValue); assertThat(properties.getString(newKey, null)).isEqualTo(newValue); String unsetKey = "key3"; properties = DeviceConfig.getProperties(sNamespace, newKey, unsetKey); assertThat(properties.getKeyset()).containsExactly(newKey, unsetKey); assertThat(properties.getString(newKey, null)).isEqualTo(newValue); assertThat(properties.getString(unsetKey, null)).isNull(); } } @Test @Test Loading