fix test
This commit is contained in:
parent
7f7e2eeb46
commit
474850c727
|
@ -9,6 +9,7 @@ import org.powermock.core.classloader.annotations.PrepareForTest;
|
|||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import info.AAPSMocker;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
|
@ -79,7 +80,7 @@ public class DateUtilTest {
|
|||
|
||||
@Test
|
||||
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
|
||||
|
@ -91,5 +92,8 @@ public class DateUtilTest {
|
|||
public void prepareMock() {
|
||||
AAPSMocker.mockMainApp();
|
||||
AAPSMocker.mockStrings();
|
||||
|
||||
TimeZone tz = TimeZone.getTimeZone("UTC");
|
||||
TimeZone.setDefault(tz);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue