diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/state/PodSessionStateTest.java b/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/state/PodSessionStateTest.java index 6d49d3f1ee..a7ba9cb861 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/state/PodSessionStateTest.java +++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/state/PodSessionStateTest.java @@ -5,37 +5,20 @@ import org.joda.time.DateTimeUtils; import org.joda.time.DateTimeZone; import org.joda.time.Duration; import org.junit.After; -import org.junit.Before; import org.junit.Ignore; import org.junit.Test; -import org.junit.runner.RunWith; import org.mockito.Mock; -import org.powermock.core.classloader.annotations.PrepareForTest; -import org.powermock.modules.junit4.PowerMockRunner; - import dagger.android.HasAndroidInjector; -import info.nightscout.androidaps.MainApp; -import info.nightscout.androidaps.logging.L; import info.nightscout.androidaps.plugins.pump.omnipod.defs.FirmwareVersion; -import info.nightscout.androidaps.utils.SP; import static org.junit.Assert.assertEquals; -@Ignore("Not Dagger compliant") -@RunWith(PowerMockRunner.class) -@PrepareForTest({MainApp.class, SP.class, L.class}) public class PodSessionStateTest { -// @Before -// public void setup() { -//// AAPSMocker.mockMainApp(); -//// AAPSMocker.mockApplicationContext(); -//// AAPSMocker.mockSP(); -// } - @Mock HasAndroidInjector hasAndroidInjector; - //@Test + @Test + @Ignore("Not Dagger compliant") // FIXME public void times() { DateTimeZone timeZone = DateTimeZone.UTC; DateTimeZone.setDefault(timeZone); @@ -54,7 +37,8 @@ public class PodSessionStateTest { assertEquals(Duration.standardHours(1).plus(Duration.standardMinutes(2).plus(Duration.standardSeconds(3))), podSessionState.getScheduleOffset()); } - //@Test + @Test + @Ignore("Not Dagger compliant") // FIXME public void changeSystemTimeZoneWithoutChangingPodTimeZone() { DateTimeZone timeZone = DateTimeZone.UTC; DateTimeZone.setDefault(timeZone); @@ -78,7 +62,8 @@ public class PodSessionStateTest { assertEquals(Duration.standardHours(1).plus(Duration.standardMinutes(2).plus(Duration.standardSeconds(3))), podSessionState.getScheduleOffset()); } - //@Test + @Test + @Ignore("Not Dagger compliant") // FIXME public void changeSystemTimeZoneAndChangePodTimeZone() { DateTimeZone timeZone = DateTimeZone.UTC; DateTimeZone.setDefault(timeZone); @@ -103,8 +88,8 @@ public class PodSessionStateTest { assertEquals(Duration.standardHours(3).plus(Duration.standardMinutes(2).plus(Duration.standardSeconds(3))), podSessionState.getScheduleOffset()); } -// @After -// public void tearDown() { -// DateTimeUtils.setCurrentMillisSystem(); -// } + @After + public void tearDown() { + DateTimeUtils.setCurrentMillisSystem(); + } } \ No newline at end of file