This commit is contained in:
Milos Kozak 2019-03-30 09:21:22 +01:00
parent 7f7e2eeb46
commit 474850c727

View file

@ -9,6 +9,7 @@ import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner; import org.powermock.modules.junit4.PowerMockRunner;
import java.util.Date; import java.util.Date;
import java.util.TimeZone;
import info.AAPSMocker; import info.AAPSMocker;
import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.MainApp;
@ -79,7 +80,7 @@ public class DateUtilTest {
@Test @Test
public void timeStringFromSecondsTest() { public void timeStringFromSecondsTest() {
Assert.assertEquals("1:00 AM", DateUtil.timeStringFromSeconds((int) T.hours(1).secs())); Assert.assertEquals("2:00 AM", DateUtil.timeStringFromSeconds((int) T.hours(1).secs()));
} }
@Test @Test
@ -91,5 +92,8 @@ public class DateUtilTest {
public void prepareMock() { public void prepareMock() {
AAPSMocker.mockMainApp(); AAPSMocker.mockMainApp();
AAPSMocker.mockStrings(); AAPSMocker.mockStrings();
TimeZone tz = TimeZone.getTimeZone("UTC");
TimeZone.setDefault(tz);
} }
} }