Loading packages/SystemUI/tests/src/com/android/systemui/media/SeekBarViewModelTest.kt +10 −1 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import com.google.common.truth.Truth.assertThat import org.junit.After import org.junit.Before import org.junit.Ignore import org.junit.Test import org.junit.runner.RunWith import org.mockito.ArgumentCaptor Loading @@ -49,7 +50,7 @@ import org.mockito.Mockito.`when` as whenever @SmallTest @RunWith(AndroidTestingRunner::class) @TestableLooper.RunWithLooper @TestableLooper.RunWithLooper(setAsMainLooper = true) public class SeekBarViewModelTest : SysuiTestCase() { private lateinit var viewModel: SeekBarViewModel Loading Loading @@ -124,6 +125,7 @@ public class SeekBarViewModelTest : SysuiTestCase() { } @Test @Ignore fun updateDurationWithPlayback() { // GIVEN that the duration is contained within the metadata val duration = 12000L Loading @@ -146,6 +148,7 @@ public class SeekBarViewModelTest : SysuiTestCase() { } @Test @Ignore fun updateDurationWithoutPlayback() { // GIVEN that the duration is contained within the metadata val duration = 12000L Loading Loading @@ -204,6 +207,7 @@ public class SeekBarViewModelTest : SysuiTestCase() { } @Test @Ignore fun updateDurationNoMetadata() { // GIVEN that the metadata is null whenever(mockController.getMetadata()).thenReturn(null) Loading Loading @@ -235,6 +239,7 @@ public class SeekBarViewModelTest : SysuiTestCase() { } @Test @Ignore fun updateSeekAvailable() { // GIVEN that seek is included in actions val state = PlaybackState.Builder().run { Loading @@ -249,6 +254,7 @@ public class SeekBarViewModelTest : SysuiTestCase() { } @Test @Ignore fun updateSeekNotAvailable() { // GIVEN that seek is not included in actions val state = PlaybackState.Builder().run { Loading Loading @@ -303,6 +309,7 @@ public class SeekBarViewModelTest : SysuiTestCase() { } @Test @Ignore fun onSeekProgressWithSeekStarting() { val pos = 42L with(viewModel) { Loading @@ -314,6 +321,7 @@ public class SeekBarViewModelTest : SysuiTestCase() { } @Test @Ignore fun onProgressChangedFromUser() { // WHEN user starts dragging the seek bar val pos = 42 Loading Loading @@ -614,6 +622,7 @@ public class SeekBarViewModelTest : SysuiTestCase() { } @Test @Ignore fun clearSeekBar() { // GIVEN that the duration is contained within the metadata val metadata = MediaMetadata.Builder().run { Loading Loading
packages/SystemUI/tests/src/com/android/systemui/media/SeekBarViewModelTest.kt +10 −1 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import com.google.common.truth.Truth.assertThat import org.junit.After import org.junit.Before import org.junit.Ignore import org.junit.Test import org.junit.runner.RunWith import org.mockito.ArgumentCaptor Loading @@ -49,7 +50,7 @@ import org.mockito.Mockito.`when` as whenever @SmallTest @RunWith(AndroidTestingRunner::class) @TestableLooper.RunWithLooper @TestableLooper.RunWithLooper(setAsMainLooper = true) public class SeekBarViewModelTest : SysuiTestCase() { private lateinit var viewModel: SeekBarViewModel Loading Loading @@ -124,6 +125,7 @@ public class SeekBarViewModelTest : SysuiTestCase() { } @Test @Ignore fun updateDurationWithPlayback() { // GIVEN that the duration is contained within the metadata val duration = 12000L Loading @@ -146,6 +148,7 @@ public class SeekBarViewModelTest : SysuiTestCase() { } @Test @Ignore fun updateDurationWithoutPlayback() { // GIVEN that the duration is contained within the metadata val duration = 12000L Loading Loading @@ -204,6 +207,7 @@ public class SeekBarViewModelTest : SysuiTestCase() { } @Test @Ignore fun updateDurationNoMetadata() { // GIVEN that the metadata is null whenever(mockController.getMetadata()).thenReturn(null) Loading Loading @@ -235,6 +239,7 @@ public class SeekBarViewModelTest : SysuiTestCase() { } @Test @Ignore fun updateSeekAvailable() { // GIVEN that seek is included in actions val state = PlaybackState.Builder().run { Loading @@ -249,6 +254,7 @@ public class SeekBarViewModelTest : SysuiTestCase() { } @Test @Ignore fun updateSeekNotAvailable() { // GIVEN that seek is not included in actions val state = PlaybackState.Builder().run { Loading Loading @@ -303,6 +309,7 @@ public class SeekBarViewModelTest : SysuiTestCase() { } @Test @Ignore fun onSeekProgressWithSeekStarting() { val pos = 42L with(viewModel) { Loading @@ -314,6 +321,7 @@ public class SeekBarViewModelTest : SysuiTestCase() { } @Test @Ignore fun onProgressChangedFromUser() { // WHEN user starts dragging the seek bar val pos = 42 Loading Loading @@ -614,6 +622,7 @@ public class SeekBarViewModelTest : SysuiTestCase() { } @Test @Ignore fun clearSeekBar() { // GIVEN that the duration is contained within the metadata val metadata = MediaMetadata.Builder().run { Loading