Loading packages/SystemUI/tests/src/com/android/systemui/qs/tiles/AirplaneModeTileTest.kt +7 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import com.android.systemui.settings.UserTracker import com.android.systemui.util.settings.GlobalSettings import com.google.common.truth.Truth.assertThat import dagger.Lazy import org.junit.After import org.junit.Before import org.junit.Test import org.junit.runner.RunWith Loading Loading @@ -94,6 +95,12 @@ class AirplaneModeTileTest : SysuiTestCase() { mUserTracker) } @After fun tearDown() { mTile.destroy() mTestableLooper.processAllMessages() } @Test fun testIcon_whenDisabled_showsOffState() { val state = QSTile.BooleanState() Loading packages/SystemUI/tests/src/com/android/systemui/qs/tiles/AlarmTileTest.kt +7 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import com.android.systemui.statusbar.policy.NextAlarmController import com.android.systemui.util.mockito.capture import com.android.systemui.util.mockito.eq import com.google.common.truth.Truth.assertThat import org.junit.After import org.junit.Before import org.junit.Test import org.junit.runner.RunWith Loading Loading @@ -88,6 +89,12 @@ class AlarmTileTest : SysuiTestCase() { testableLooper.processAllMessages() } @After fun tearDown() { tile.destroy() testableLooper.processAllMessages() } @Test fun testAvailable() { assertThat(tile.isAvailable).isTrue() Loading packages/SystemUI/tests/src/com/android/systemui/qs/tiles/BatterySaverTileTest.kt +7 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import com.android.systemui.statusbar.policy.BatteryController import com.android.systemui.util.settings.FakeSettings import com.android.systemui.util.settings.SecureSettings import com.google.common.truth.Truth.assertThat import org.junit.After import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Test Loading Loading @@ -103,6 +104,12 @@ class BatterySaverTileTest : SysuiTestCase() { testableLooper.processAllMessages() } @After fun tearDown() { tile.destroy() testableLooper.processAllMessages() } @Test fun testSettingWithCorrectUser() { assertEquals(USER, tile.mSetting.currentUser) Loading packages/SystemUI/tests/src/com/android/systemui/qs/tiles/BluetoothTileTest.kt +7 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import com.android.systemui.qs.logging.QSLogger import com.android.systemui.qs.tileimpl.QSTileImpl import com.android.systemui.statusbar.policy.BluetoothController import com.google.common.truth.Truth.assertThat import org.junit.After import org.junit.Before import org.junit.Test import org.junit.runner.RunWith Loading Loading @@ -79,6 +80,12 @@ class BluetoothTileTest : SysuiTestCase() { testableLooper.processAllMessages() } @After fun tearDown() { tile.destroy() testableLooper.processAllMessages() } @Test fun testRestrictionChecked() { tile.refreshState() Loading packages/SystemUI/tests/src/com/android/systemui/qs/tiles/CameraToggleTileTest.kt +7 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import com.android.systemui.qs.tileimpl.QSTileImpl import com.android.systemui.statusbar.policy.IndividualSensorPrivacyController import com.android.systemui.statusbar.policy.KeyguardStateController import com.google.common.truth.Truth.assertThat import org.junit.After import org.junit.Before import org.junit.Test import org.junit.runner.RunWith Loading Loading @@ -90,6 +91,12 @@ class CameraToggleTileTest : SysuiTestCase() { keyguardStateController) } @After fun tearDown() { tile.destroy() testableLooper.processAllMessages() } @Test fun testIcon_whenCameraAccessEnabled_isOnState() { val state = QSTile.BooleanState() Loading Loading
packages/SystemUI/tests/src/com/android/systemui/qs/tiles/AirplaneModeTileTest.kt +7 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import com.android.systemui.settings.UserTracker import com.android.systemui.util.settings.GlobalSettings import com.google.common.truth.Truth.assertThat import dagger.Lazy import org.junit.After import org.junit.Before import org.junit.Test import org.junit.runner.RunWith Loading Loading @@ -94,6 +95,12 @@ class AirplaneModeTileTest : SysuiTestCase() { mUserTracker) } @After fun tearDown() { mTile.destroy() mTestableLooper.processAllMessages() } @Test fun testIcon_whenDisabled_showsOffState() { val state = QSTile.BooleanState() Loading
packages/SystemUI/tests/src/com/android/systemui/qs/tiles/AlarmTileTest.kt +7 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import com.android.systemui.statusbar.policy.NextAlarmController import com.android.systemui.util.mockito.capture import com.android.systemui.util.mockito.eq import com.google.common.truth.Truth.assertThat import org.junit.After import org.junit.Before import org.junit.Test import org.junit.runner.RunWith Loading Loading @@ -88,6 +89,12 @@ class AlarmTileTest : SysuiTestCase() { testableLooper.processAllMessages() } @After fun tearDown() { tile.destroy() testableLooper.processAllMessages() } @Test fun testAvailable() { assertThat(tile.isAvailable).isTrue() Loading
packages/SystemUI/tests/src/com/android/systemui/qs/tiles/BatterySaverTileTest.kt +7 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import com.android.systemui.statusbar.policy.BatteryController import com.android.systemui.util.settings.FakeSettings import com.android.systemui.util.settings.SecureSettings import com.google.common.truth.Truth.assertThat import org.junit.After import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Test Loading Loading @@ -103,6 +104,12 @@ class BatterySaverTileTest : SysuiTestCase() { testableLooper.processAllMessages() } @After fun tearDown() { tile.destroy() testableLooper.processAllMessages() } @Test fun testSettingWithCorrectUser() { assertEquals(USER, tile.mSetting.currentUser) Loading
packages/SystemUI/tests/src/com/android/systemui/qs/tiles/BluetoothTileTest.kt +7 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import com.android.systemui.qs.logging.QSLogger import com.android.systemui.qs.tileimpl.QSTileImpl import com.android.systemui.statusbar.policy.BluetoothController import com.google.common.truth.Truth.assertThat import org.junit.After import org.junit.Before import org.junit.Test import org.junit.runner.RunWith Loading Loading @@ -79,6 +80,12 @@ class BluetoothTileTest : SysuiTestCase() { testableLooper.processAllMessages() } @After fun tearDown() { tile.destroy() testableLooper.processAllMessages() } @Test fun testRestrictionChecked() { tile.refreshState() Loading
packages/SystemUI/tests/src/com/android/systemui/qs/tiles/CameraToggleTileTest.kt +7 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import com.android.systemui.qs.tileimpl.QSTileImpl import com.android.systemui.statusbar.policy.IndividualSensorPrivacyController import com.android.systemui.statusbar.policy.KeyguardStateController import com.google.common.truth.Truth.assertThat import org.junit.After import org.junit.Before import org.junit.Test import org.junit.runner.RunWith Loading Loading @@ -90,6 +91,12 @@ class CameraToggleTileTest : SysuiTestCase() { keyguardStateController) } @After fun tearDown() { tile.destroy() testableLooper.processAllMessages() } @Test fun testIcon_whenCameraAccessEnabled_isOnState() { val state = QSTile.BooleanState() Loading