diff options
author | Nick Chalko <nchalko@google.com> | 2018-01-17 11:15:16 -0800 |
---|---|---|
committer | Nick Chalko <nchalko@google.com> | 2018-01-17 11:20:37 -0800 |
commit | 38fef3bf253578f518d1bc727da4afb263194398 (patch) | |
tree | 09a06234eda7c54216bca773b6d8407eafe0722d /tests/unit/src/com/android/tv/data/GenreItemTest.java | |
parent | c9889d13513e26649a7708cf2d0562cb592d441a (diff) | |
download | TV-38fef3bf253578f518d1bc727da4afb263194398.tar.gz |
Fix broken build
This reverts
c9889d1 Update aosp build to use a snapshot of exoplyer. by nchalko · 5
hours ago master
8952aa7 Clean format by nchalko · 20 hours ago
ba3fb16 Merge "Use a snapshot of exoplayer" by TreeHugger Robot · 18
hours ago
ff75e39 Project import generated by Copybara. by Live Channels Team · 22
hours ago
9737fc2 Use a snapshot of exoplayer by Nick Chalko · 20 hours ago
4a5144a Project import generated by Copybara. by Live Channels Team · 6
days ago
Bug: 72092981
Bug: 69474774
Change-Id: Ie756857c10bf052c60b6442c3d61252f65b49143
Diffstat (limited to 'tests/unit/src/com/android/tv/data/GenreItemTest.java')
-rw-r--r-- | tests/unit/src/com/android/tv/data/GenreItemTest.java | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/tests/unit/src/com/android/tv/data/GenreItemTest.java b/tests/unit/src/com/android/tv/data/GenreItemTest.java index 02bf4b30..dbf99eac 100644 --- a/tests/unit/src/com/android/tv/data/GenreItemTest.java +++ b/tests/unit/src/com/android/tv/data/GenreItemTest.java @@ -17,18 +17,18 @@ package com.android.tv.data; import static android.support.test.InstrumentationRegistry.getTargetContext; -import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; import android.media.tv.TvContract.Programs.Genres; import android.os.Build; import android.support.test.filters.SmallTest; -import android.support.test.runner.AndroidJUnit4; import org.junit.Test; -import org.junit.runner.RunWith; /** Tests for {@link Channel}. */ @SmallTest -@RunWith(AndroidJUnit4.class) public class GenreItemTest { private static final String INVALID_GENRE = "INVALID GENRE"; @@ -41,17 +41,17 @@ public class GenreItemTest { @Test public void testGetCanonicalGenre() { int count = GenreItems.getGenreCount(); - assertThat(GenreItems.getCanonicalGenre(GenreItems.ID_ALL_CHANNELS)).isNull(); + assertNull(GenreItems.getCanonicalGenre(GenreItems.ID_ALL_CHANNELS)); for (int i = 1; i < count; ++i) { - assertThat(GenreItems.getCanonicalGenre(i)).isNotNull(); + assertNotNull(GenreItems.getCanonicalGenre(i)); } } @Test public void testGetId_base() { int count = GenreItems.getGenreCount(); - assertThat(GenreItems.getId(null)).isEqualTo(GenreItems.ID_ALL_CHANNELS); - assertThat(GenreItems.getId(INVALID_GENRE)).isEqualTo(GenreItems.ID_ALL_CHANNELS); + assertEquals(GenreItems.ID_ALL_CHANNELS, GenreItems.getId(null)); + assertEquals(GenreItems.ID_ALL_CHANNELS, GenreItems.getId(INVALID_GENRE)); assertInRange(GenreItems.getId(Genres.FAMILY_KIDS), 1, count - 1); assertInRange(GenreItems.getId(Genres.SPORTS), 1, count - 1); assertInRange(GenreItems.getId(Genres.SHOPPING), 1, count - 1); @@ -68,13 +68,12 @@ public class GenreItemTest { @Test public void testGetId_lmp_mr1() { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP_MR1) { - assertThat(GenreItems.getId(Genres.ARTS)).isEqualTo(GenreItems.ID_ALL_CHANNELS); - assertThat(GenreItems.getId(Genres.ENTERTAINMENT)) - .isEqualTo(GenreItems.ID_ALL_CHANNELS); - assertThat(GenreItems.getId(Genres.LIFE_STYLE)).isEqualTo(GenreItems.ID_ALL_CHANNELS); - assertThat(GenreItems.getId(Genres.MUSIC)).isEqualTo(GenreItems.ID_ALL_CHANNELS); - assertThat(GenreItems.getId(Genres.PREMIER)).isEqualTo(GenreItems.ID_ALL_CHANNELS); - assertThat(GenreItems.getId(Genres.TECH_SCIENCE)).isEqualTo(GenreItems.ID_ALL_CHANNELS); + assertEquals(GenreItems.ID_ALL_CHANNELS, GenreItems.getId(Genres.ARTS)); + assertEquals(GenreItems.ID_ALL_CHANNELS, GenreItems.getId(Genres.ENTERTAINMENT)); + assertEquals(GenreItems.ID_ALL_CHANNELS, GenreItems.getId(Genres.LIFE_STYLE)); + assertEquals(GenreItems.ID_ALL_CHANNELS, GenreItems.getId(Genres.MUSIC)); + assertEquals(GenreItems.ID_ALL_CHANNELS, GenreItems.getId(Genres.PREMIER)); + assertEquals(GenreItems.ID_ALL_CHANNELS, GenreItems.getId(Genres.TECH_SCIENCE)); } else { int count = GenreItems.getGenreCount(); assertInRange(GenreItems.getId(Genres.ARTS), 1, count - 1); @@ -87,6 +86,6 @@ public class GenreItemTest { } private void assertInRange(int value, int lower, int upper) { - assertThat(value >= lower && value <= upper).isTrue(); + assertTrue(value >= lower && value <= upper); } } |