From 6ebde20b03db4c0d57f67acaac11832b610b966b Mon Sep 17 00:00:00 2001 From: Nick Chalko Date: Tue, 3 Oct 2017 10:16:37 -0700 Subject: Sync to match Live Channels 1.15(ncis) aka ub-tv-dev at a73a150bb7d0d1ce867ef980c6ac8411899d40ad Bug: 64021596 Change-Id: I7c544fd15e2c58784f8babc31877ad0dfeebb4c0 (cherry picked from commit 633eb826b8c97731dfc5ef12c7bf78a63734275d) --- .../unit/src/com/android/tv/util/UtilsTest_IsInGivenDay.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'tests/unit/src/com/android/tv/util/UtilsTest_IsInGivenDay.java') diff --git a/tests/unit/src/com/android/tv/util/UtilsTest_IsInGivenDay.java b/tests/unit/src/com/android/tv/util/UtilsTest_IsInGivenDay.java index 926deb07..2b43abc1 100644 --- a/tests/unit/src/com/android/tv/util/UtilsTest_IsInGivenDay.java +++ b/tests/unit/src/com/android/tv/util/UtilsTest_IsInGivenDay.java @@ -16,8 +16,12 @@ package com.android.tv.util; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + import android.support.test.filters.SmallTest; -import android.test.AndroidTestCase; + +import org.junit.Test; import java.util.Calendar; import java.util.GregorianCalendar; @@ -27,19 +31,22 @@ import java.util.TimeZone; * Tests for {@link com.android.tv.util.Utils#isInGivenDay}. */ @SmallTest -public class UtilsTest_IsInGivenDay extends AndroidTestCase { +public class UtilsTest_IsInGivenDay { + @Test public void testIsInGivenDay() { assertTrue(Utils.isInGivenDay( new GregorianCalendar(2015, Calendar.JANUARY, 1).getTimeInMillis(), new GregorianCalendar(2015, Calendar.JANUARY, 1, 0, 30).getTimeInMillis())); } + @Test public void testIsNotInGivenDay() { assertFalse(Utils.isInGivenDay( new GregorianCalendar(2015, Calendar.JANUARY, 1).getTimeInMillis(), new GregorianCalendar(2015, Calendar.JANUARY, 2).getTimeInMillis())); } + @Test public void testIfTimeZoneApplied() { TimeZone timeZone = TimeZone.getDefault(); -- cgit v1.2.3