Add test for SilenceAlertsCommand
This commit is contained in:
parent
e7e6f52305
commit
fa05163019
1 changed files with 15 additions and 1 deletions
|
@ -1,5 +1,19 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command;
|
||||
|
||||
// TODO capture silence alerts command
|
||||
import org.apache.commons.codec.DecoderException;
|
||||
import org.apache.commons.codec.binary.Hex;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
|
||||
public class SilenceAlertsCommandTest {
|
||||
@Test
|
||||
public void testSilenceLowReservoirAlert() throws DecoderException {
|
||||
byte[] encoded = new SilenceAlertsCommand(37879811, (short) 1, false, new SilenceAlertsCommand.SilenceAlertCommandParameters(false, false, false, false, true, false, false, false)) //
|
||||
.getEncoded();
|
||||
|
||||
assertArrayEquals(Hex.decodeHex("0242000304071105494E532E1081CE"), encoded);
|
||||
}
|
||||
|
||||
// TODO capture more silence alerts commands
|
||||
}
|
Loading…
Reference in a new issue