@Test public void runTest() { AAPSMocker.mockMainApp(); AAPSMocker.mockApplicationContext(); AAPSMocker.mockSP(); AAPSMocker.mockL(); MsgSetActivateBasalProfile packet = new MsgSetActivateBasalProfile((byte) 1); packet.handleMessage(createArray(34, (byte) 7)); assertEquals(true, packet.failed); }
@Override public void handleMessage(byte[] bytes) { int result = intFromBuff(bytes, 0, 1); if (result != 1) { failed = true; if (L.isEnabled(L.PUMPCOMM)) log.debug("Activate basal profile result: " + result + " FAILED!!!"); } else { if (L.isEnabled(L.PUMPCOMM)) log.debug("Activate basal profile result: " + result); } }
MsgSetActivateBasalProfile extends MessageBase { @Override public void handleMessage(byte[] bytes) { int result = intFromBuff(bytes, 0, 1); if (result != 1) { failed = true; if (L.isEnabled(L.PUMPCOMM)) log.debug("Activate basal profile result: " + result + " FAILED!!!"); } else { if (L.isEnabled(L.PUMPCOMM)) log.debug("Activate basal profile result: " + result); } } }
MsgSetActivateBasalProfile extends MessageBase { @Override public void handleMessage(byte[] bytes) { int result = intFromBuff(bytes, 0, 1); if (result != 1) { failed = true; if (L.isEnabled(L.PUMPCOMM)) log.debug("Activate basal profile result: " + result + " FAILED!!!"); } else { if (L.isEnabled(L.PUMPCOMM)) log.debug("Activate basal profile result: " + result); } } MsgSetActivateBasalProfile();  MsgSetActivateBasalProfile(byte index); }
MsgSetActivateBasalProfile extends MessageBase { @Override public void handleMessage(byte[] bytes) { int result = intFromBuff(bytes, 0, 1); if (result != 1) { failed = true; if (L.isEnabled(L.PUMPCOMM)) log.debug("Activate basal profile result: " + result + " FAILED!!!"); } else { if (L.isEnabled(L.PUMPCOMM)) log.debug("Activate basal profile result: " + result); } } MsgSetActivateBasalProfile();  MsgSetActivateBasalProfile(byte index); @Override void handleMessage(byte[] bytes); }
MsgSetActivateBasalProfile extends MessageBase { @Override public void handleMessage(byte[] bytes) { int result = intFromBuff(bytes, 0, 1); if (result != 1) { failed = true; if (L.isEnabled(L.PUMPCOMM)) log.debug("Activate basal profile result: " + result + " FAILED!!!"); } else { if (L.isEnabled(L.PUMPCOMM)) log.debug("Activate basal profile result: " + result); } } MsgSetActivateBasalProfile();  MsgSetActivateBasalProfile(byte index); @Override void handleMessage(byte[] bytes);  }