diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Extended_BolusTest.java b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Extended_BolusTest.java deleted file mode 100644 index 920ba7cc86..0000000000 --- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Extended_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.plugins.pump.danaR.DanaRPump; -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_Get_Extended_BolusTest { - - @Test - public void runTest() { - AAPSMocker.mockMainApp(); - AAPSMocker.mockApplicationContext(); - AAPSMocker.mockSP(); - AAPSMocker.mockL(); - DanaRS_Packet_Bolus_Get_Extended_Bolus packet = new DanaRS_Packet_Bolus_Get_Extended_Bolus(); - - // test params - assertEquals(null, packet.getRequestParams()); - - // test message decoding - double testValue = 0d; - packet.handleMessage(createArray(10, (byte) testValue)); - assertEquals(testValue != 0d, packet.failed); - testValue = 1d; - packet.handleMessage(createArray(10, (byte) testValue)); - // is pump.bolustep set to 1 - DanaRPump pump = DanaRPump.getInstance(); - assertEquals(testValue / 100d, pump.bolusStep, 0); - assertEquals(testValue != 0d, packet.failed); - - assertEquals("BOLUS__GET_EXTENDED_BOLUS", packet.getFriendlyName()); - } - - byte[] createArray(int length, byte fillWith){ - byte[] ret = new byte[length]; - for(int i = 0; i