diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Dual_BolusTest.java b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Dual_BolusTest.java deleted file mode 100644 index 5e16f6ef2e..0000000000 --- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Dual_BolusTest.java +++ /dev/null @@ -1,65 +0,0 @@ -package info.nightscout.androidaps.plugins.pump.danaRS.comm; - - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.powermock.core.classloader.annotations.PrepareForTest; -import org.powermock.modules.junit4.PowerMockRunner; - -import info.AAPSMocker; -import info.nightscout.androidaps.MainApp; -import info.nightscout.androidaps.logging.L; -import info.nightscout.androidaps.utils.SP; - -import static org.junit.Assert.assertEquals; - -/** - * Created by Rumen on 06.08.2018. - */ - -@RunWith(PowerMockRunner.class) -@PrepareForTest({MainApp.class, SP.class, L.class}) -public class DanaRS_Packet_Bolus_Set_Dual_BolusTest { - - @Test - public void runTest() { - AAPSMocker.mockMainApp(); - AAPSMocker.mockApplicationContext(); - AAPSMocker.mockSP(); - AAPSMocker.mockL(); - DanaRS_Packet_Bolus_Set_Dual_Bolus packet = new DanaRS_Packet_Bolus_Set_Dual_Bolus(0d, 0d, 1); - - // test params - byte[] testparams = packet.getRequestParams(); - assertEquals(0, testparams[0]); - assertEquals(1, testparams[4]); - - // test message decoding - packet.handleMessage(createArray(34, (byte) 0)); -// DanaRPump testPump = DanaRPump.getInstance(); - assertEquals(false, packet.failed); - - packet.handleMessage(createArray(34, (byte) 1)); -// int valueRequested = (((byte) 1 & 0x000000FF) << 8) + (((byte) 1) & 0x000000FF); -// assertEquals(valueRequested /100d, testPump.lastBolusAmount, 0); - assertEquals(true, packet.failed); - - assertEquals("BOLUS__SET_DUAL_BOLUS", packet.getFriendlyName()); - } - - byte[] createArray(int length, byte fillWith){ - byte[] ret = new byte[length]; - for(int i = 0; i>> 8), testparams[9]); - - // test message decoding - packet.handleMessage(createArray(34, (byte) 0)); - assertEquals(false, packet.failed); - - packet.handleMessage(createArray(34, (byte) 1)); - assertEquals(true, packet.failed); - - assertEquals("ETC__SET_HISTORY_SAVE", packet.getFriendlyName()); - } - - byte[] createArray(int length, byte fillWith){ - byte[] ret = new byte[length]; - for(int i = 0; i