another try to fix test
This commit is contained in:
parent
e990dc6524
commit
0cc3df589f
|
@ -30,7 +30,7 @@ public class TriggerTimeRangeTest {
|
||||||
int now = 754;
|
int now = 754;
|
||||||
int timeZoneOffset = (int) (DateUtil.getTimeZoneOffsetMs() / 60000);
|
int timeZoneOffset = (int) (DateUtil.getTimeZoneOffsetMs() / 60000);
|
||||||
|
|
||||||
String timeJson = "{\"data\":{\"lastRun\":0,\"start\":873,\"end\":904},\"type\":\"info.nightscout.androidaps.plugins.general.automation.triggers.TriggerTimeRange\"}";
|
String timeJson = "{\"data\":{\"lastRun\":0,\"start\":753,\"end\":784},\"type\":\"info.nightscout.androidaps.plugins.general.automation.triggers.TriggerTimeRange\"}";
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void shouldRunTest() {
|
public void shouldRunTest() {
|
||||||
|
@ -57,8 +57,7 @@ public class TriggerTimeRangeTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void toJSONTest() {
|
public void toJSONTest() {
|
||||||
now = 754;
|
TriggerTimeRange t = new TriggerTimeRange().period(now - 1 - timeZoneOffset , now + 30 - timeZoneOffset);
|
||||||
TriggerTimeRange t = new TriggerTimeRange().period(now - 1, now + 30);
|
|
||||||
Assert.assertEquals(timeJson, t.toJSON());
|
Assert.assertEquals(timeJson, t.toJSON());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue