parent
6606f5453e
commit
19d2f9635a
1 changed files with 5 additions and 4 deletions
|
@ -1,7 +1,8 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.podinfo;
|
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.podinfo;
|
||||||
|
|
||||||
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
|
|
||||||
import org.joda.time.Duration;
|
import org.joda.time.Duration;
|
||||||
import org.junit.jupiter.api.Assertions;
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -15,7 +16,7 @@ class PodInfoActiveAlertsTest {
|
||||||
PodInfoActiveAlerts podInfoActiveAlerts = new PodInfoActiveAlerts(encodedMessage);
|
PodInfoActiveAlerts podInfoActiveAlerts = new PodInfoActiveAlerts(encodedMessage);
|
||||||
|
|
||||||
List<PodInfoActiveAlerts.AlertActivation> alertActivations = podInfoActiveAlerts.getAlertActivations();
|
List<PodInfoActiveAlerts.AlertActivation> alertActivations = podInfoActiveAlerts.getAlertActivations();
|
||||||
Assertions.assertEquals(0, alertActivations.size());
|
assertThat(alertActivations).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -24,10 +25,10 @@ class PodInfoActiveAlertsTest {
|
||||||
PodInfoActiveAlerts podInfoActiveAlerts = new PodInfoActiveAlerts(encodedMessage);
|
PodInfoActiveAlerts podInfoActiveAlerts = new PodInfoActiveAlerts(encodedMessage);
|
||||||
|
|
||||||
List<PodInfoActiveAlerts.AlertActivation> alertActivations = podInfoActiveAlerts.getAlertActivations();
|
List<PodInfoActiveAlerts.AlertActivation> alertActivations = podInfoActiveAlerts.getAlertActivations();
|
||||||
Assertions.assertEquals(1, alertActivations.size());
|
assertThat(alertActivations).hasSize(1);
|
||||||
|
|
||||||
PodInfoActiveAlerts.AlertActivation alertActivation = alertActivations.get(0);
|
PodInfoActiveAlerts.AlertActivation alertActivation = alertActivations.get(0);
|
||||||
Duration expectedDuration = Duration.standardHours(72).plus(Duration.standardMinutes(1));
|
Duration expectedDuration = Duration.standardHours(72).plus(Duration.standardMinutes(1));
|
||||||
Assertions.assertTrue(expectedDuration.isEqual(alertActivation.getValueAsDuration()));
|
assertThat(expectedDuration).isEqualTo(alertActivation.getValueAsDuration());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue