aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2018-01-26 20:23:53 -0800
committerAndreas Gampe <agampe@google.com>2018-01-26 20:23:53 -0800
commit5373a82117e42ab1e27c94714d436a04900a8c8b (patch)
tree7107654fc360afba658362881b1a76ae743b146e
parente1bbccd5af911ffcbc6c7144d07b454f13eb102f (diff)
downloadTV-5373a82117e42ab1e27c94714d436a04900a8c8b.tar.gz
TV: Annotate tests
Annotate tests with @Test. Found by errorprone. Bug: 72076216 Test: m javac-check RUN_ERROR_PRONE=true Change-Id: I22b2c31544279f38da15098aa7e5f92fae1f13c0
-rw-r--r--tests/unit/src/com/android/tv/data/ChannelTest.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit/src/com/android/tv/data/ChannelTest.java b/tests/unit/src/com/android/tv/data/ChannelTest.java
index d270e277..69fcb858 100644
--- a/tests/unit/src/com/android/tv/data/ChannelTest.java
+++ b/tests/unit/src/com/android/tv/data/ChannelTest.java
@@ -115,6 +115,7 @@ public class ChannelTest {
assertAppLinkType(Channel.APP_LINK_TYPE_APP, LEANBACK_TV_INPUT_PACKAGE_NAME, null, null);
}
+ @Test
public void testGetAppLinkType_NoText_InvalidIntent() {
assertAppLinkType(Channel.APP_LINK_TYPE_NONE, INVALID_TV_INPUT_PACKAGE_NAME, null,
mInvalidIntent);
@@ -126,6 +127,7 @@ public class ChannelTest {
mInvalidIntent);
}
+ @Test
public void testGetAppLinkType_NoText_ValidIntent() {
assertAppLinkType(Channel.APP_LINK_TYPE_NONE, INVALID_TV_INPUT_PACKAGE_NAME, null,
mValidIntent);
@@ -137,6 +139,7 @@ public class ChannelTest {
mValidIntent);
}
+ @Test
public void testGetAppLinkType_HasText_NoIntent() {
assertAppLinkType(Channel.APP_LINK_TYPE_NONE, INVALID_TV_INPUT_PACKAGE_NAME,
TEST_APP_LINK_TEXT, null);
@@ -148,6 +151,7 @@ public class ChannelTest {
TEST_APP_LINK_TEXT, null);
}
+ @Test
public void testGetAppLinkType_HasText_InvalidIntent() {
assertAppLinkType(Channel.APP_LINK_TYPE_NONE, INVALID_TV_INPUT_PACKAGE_NAME,
TEST_APP_LINK_TEXT, mInvalidIntent);
@@ -159,6 +163,7 @@ public class ChannelTest {
TEST_APP_LINK_TEXT, mInvalidIntent);
}
+ @Test
public void testGetAppLinkType_HasText_ValidIntent() {
assertAppLinkType(Channel.APP_LINK_TYPE_CHANNEL, INVALID_TV_INPUT_PACKAGE_NAME,
TEST_APP_LINK_TEXT, mValidIntent);
@@ -184,6 +189,7 @@ public class ChannelTest {
expectedType, testChannel.getAppLinkType(mMockContext));
}
+ @Test
public void testComparator() {
TvInputManagerHelper manager = Mockito.mock(TvInputManagerHelper.class);
@@ -229,6 +235,7 @@ public class ChannelTest {
* <p>Sort partner inputs first, then sort by input label, then by input id.
* See <a href="http://b/23031603">b/23031603</a>.
*/
+ @Test
public void testComparatorLabel() {
TvInputManagerHelper manager = Mockito.mock(TvInputManagerHelper.class);
Mockito.when(manager.isPartnerInput(Matchers.anyString())).thenAnswer(
@@ -257,6 +264,7 @@ public class ChannelTest {
comparatorTester.test();
}
+ @Test
public void testNormalizeChannelNumber() {
assertNormalizedDisplayNumber(null, null);
assertNormalizedDisplayNumber("", "");