From ffc9f8f13300272b14e8e1d45d16f875cc82351f Mon Sep 17 00:00:00 2001 From: nchalko Date: Tue, 20 Feb 2018 11:58:39 -0800 Subject: CLEANUP: Add build target for recomendation tests PiperOrigin-RevId: 186339593 Change-Id: I689eff2af0cb682415c23f5afdb9ba33bfc02d23 --- tests/unit/src/com/android/tv/recommendation/ChannelRecordTest.java | 3 +++ .../com/android/tv/recommendation/FavoriteChannelEvaluatorTest.java | 3 +++ .../src/com/android/tv/recommendation/RecentChannelEvaluatorTest.java | 3 +++ tests/unit/src/com/android/tv/recommendation/RecommenderTest.java | 3 +++ .../src/com/android/tv/recommendation/RoutineWatchEvaluatorTest.java | 3 +++ 5 files changed, 15 insertions(+) (limited to 'tests/unit/src/com/android/tv') 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 { 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 { 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 { private static class ScoredItem implements Comparable { private final String mBase; -- cgit v1.2.3