aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornchalko <nchalko@google.com>2018-02-20 11:58:39 -0800
committerNick Chalko <nchalko@google.com>2018-02-21 11:11:55 -0800
commitffc9f8f13300272b14e8e1d45d16f875cc82351f (patch)
tree48c03ecc94ad16fb96ce23e5a950d0a768c97c44
parent777908546e47297618750d083bb89fe7d98f4853 (diff)
downloadTV-ffc9f8f13300272b14e8e1d45d16f875cc82351f.tar.gz
CLEANUP: Add build target for recomendation tests
PiperOrigin-RevId: 186339593 Change-Id: I689eff2af0cb682415c23f5afdb9ba33bfc02d23
-rw-r--r--tests/unit/src/com/android/tv/recommendation/ChannelRecordTest.java3
-rw-r--r--tests/unit/src/com/android/tv/recommendation/FavoriteChannelEvaluatorTest.java3
-rw-r--r--tests/unit/src/com/android/tv/recommendation/RecentChannelEvaluatorTest.java3
-rw-r--r--tests/unit/src/com/android/tv/recommendation/RecommenderTest.java3
-rw-r--r--tests/unit/src/com/android/tv/recommendation/RoutineWatchEvaluatorTest.java3
5 files changed, 15 insertions, 0 deletions
diff --git a/tests/unit/src/com/android/tv/recommendation/ChannelRecordTest.java b/tests/unit/src/com/android/tv/recommendation/ChannelRecordTest.java
index c2f0d0c5..ac0e0cac 100644
--- a/tests/unit/src/com/android/tv/recommendation/ChannelRecordTest.java
+++ b/tests/unit/src/com/android/tv/recommendation/ChannelRecordTest.java
@@ -20,14 +20,17 @@ import static android.support.test.InstrumentationRegistry.getContext;
import static org.junit.Assert.assertEquals;
import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
import com.android.tv.testing.utils.Utils;
import java.util.Random;
import java.util.concurrent.TimeUnit;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
/** Unit tests for {@link ChannelRecord}. */
@SmallTest
+@RunWith(AndroidJUnit4.class)
public class ChannelRecordTest {
private static final int CHANNEL_RECORD_MAX_HISTORY_SIZE = ChannelRecord.MAX_HISTORY_SIZE;
diff --git a/tests/unit/src/com/android/tv/recommendation/FavoriteChannelEvaluatorTest.java b/tests/unit/src/com/android/tv/recommendation/FavoriteChannelEvaluatorTest.java
index 76c0a5ed..e3560467 100644
--- a/tests/unit/src/com/android/tv/recommendation/FavoriteChannelEvaluatorTest.java
+++ b/tests/unit/src/com/android/tv/recommendation/FavoriteChannelEvaluatorTest.java
@@ -19,12 +19,15 @@ package com.android.tv.recommendation;
import static org.junit.Assert.assertTrue;
import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.junit.Test;
+import org.junit.runner.RunWith;
/** Unit tests for {@link FavoriteChannelEvaluator}. */
@SmallTest
+@RunWith(AndroidJUnit4.class)
public class FavoriteChannelEvaluatorTest extends EvaluatorTestCase<FavoriteChannelEvaluator> {
private static final int DEFAULT_NUMBER_OF_CHANNELS = 4;
private static final long DEFAULT_WATCH_START_TIME_MS =
diff --git a/tests/unit/src/com/android/tv/recommendation/RecentChannelEvaluatorTest.java b/tests/unit/src/com/android/tv/recommendation/RecentChannelEvaluatorTest.java
index fb957a83..7fa09b7a 100644
--- a/tests/unit/src/com/android/tv/recommendation/RecentChannelEvaluatorTest.java
+++ b/tests/unit/src/com/android/tv/recommendation/RecentChannelEvaluatorTest.java
@@ -19,14 +19,17 @@ package com.android.tv.recommendation;
import static org.junit.Assert.assertTrue;
import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.junit.Test;
+import org.junit.runner.RunWith;
/** Unit tests for {@link RecentChannelEvaluator}. */
@SmallTest
+@RunWith(AndroidJUnit4.class)
public class RecentChannelEvaluatorTest extends EvaluatorTestCase<RecentChannelEvaluator> {
private static final int DEFAULT_NUMBER_OF_CHANNELS = 4;
private static final long DEFAULT_WATCH_START_TIME_MS =
diff --git a/tests/unit/src/com/android/tv/recommendation/RecommenderTest.java b/tests/unit/src/com/android/tv/recommendation/RecommenderTest.java
index 1b5cca72..f70c8e26 100644
--- a/tests/unit/src/com/android/tv/recommendation/RecommenderTest.java
+++ b/tests/unit/src/com/android/tv/recommendation/RecommenderTest.java
@@ -22,6 +22,7 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
import android.test.MoreAsserts;
import com.android.tv.data.api.Channel;
import com.android.tv.recommendation.RecommendationUtils.ChannelRecordSortedMapHelper;
@@ -36,8 +37,10 @@ import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
@SmallTest
+@RunWith(AndroidJUnit4.class)
public class RecommenderTest {
private static final int DEFAULT_NUMBER_OF_CHANNELS = 5;
private static final long DEFAULT_WATCH_START_TIME_MS =
diff --git a/tests/unit/src/com/android/tv/recommendation/RoutineWatchEvaluatorTest.java b/tests/unit/src/com/android/tv/recommendation/RoutineWatchEvaluatorTest.java
index a675df85..91d61c06 100644
--- a/tests/unit/src/com/android/tv/recommendation/RoutineWatchEvaluatorTest.java
+++ b/tests/unit/src/com/android/tv/recommendation/RoutineWatchEvaluatorTest.java
@@ -19,6 +19,7 @@ package com.android.tv.recommendation;
import static org.junit.Assert.assertEquals;
import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
import android.test.MoreAsserts;
import com.android.tv.data.Program;
import com.android.tv.recommendation.RoutineWatchEvaluator.ProgramTime;
@@ -28,8 +29,10 @@ import java.util.List;
import java.util.TreeSet;
import java.util.concurrent.TimeUnit;
import org.junit.Test;
+import org.junit.runner.RunWith;
@SmallTest
+@RunWith(AndroidJUnit4.class)
public class RoutineWatchEvaluatorTest extends EvaluatorTestCase<RoutineWatchEvaluator> {
private static class ScoredItem implements Comparable<ScoredItem> {
private final String mBase;