From 6d6dee6f0b441d3eb155cd5fde2dc0f34326b7e0 Mon Sep 17 00:00:00 2001 From: "Markus M. May" Date: Sun, 1 Apr 2018 23:01:37 +0200 Subject: [PATCH] Use org.junit instead of junit.framework, use static imports --- .../plugins/PumpDanaRS/DanaRSPluginTest.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/PumpDanaRS/DanaRSPluginTest.java b/app/src/test/java/info/nightscout/androidaps/plugins/PumpDanaRS/DanaRSPluginTest.java index 902a3eb682..645540d5e8 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/PumpDanaRS/DanaRSPluginTest.java +++ b/app/src/test/java/info/nightscout/androidaps/plugins/PumpDanaRS/DanaRSPluginTest.java @@ -2,8 +2,6 @@ package info.nightscout.androidaps.plugins.PumpDanaRS; import android.content.Context; -import junit.framework.Assert; - import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -21,6 +19,7 @@ import info.nightscout.androidaps.plugins.PumpDanaR.DanaRPump; import info.nightscout.utils.SP; import info.nightscout.utils.ToastUtils; +import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.when; /** @@ -41,9 +40,9 @@ public class DanaRSPluginTest { Constraint c = new Constraint<>(Constants.REALLYHIGHBASALRATE); danaRSPlugin.applyBasalConstraints(c, AAPSMocker.getValidProfile()); - Assert.assertEquals(0.8d, c.value()); - Assert.assertEquals("DanaRS: Limiting basal rate to 0.80 U/h because of pump limit", c.getReasons()); - Assert.assertEquals("DanaRS: Limiting basal rate to 0.80 U/h because of pump limit", c.getMostLimitedReasons()); + assertEquals(Double.valueOf(0.8d), c.value()); + assertEquals("DanaRS: Limiting basal rate to 0.80 U/h because of pump limit", c.getReasons()); + assertEquals("DanaRS: Limiting basal rate to 0.80 U/h because of pump limit", c.getMostLimitedReasons()); } @Test @@ -54,9 +53,9 @@ public class DanaRSPluginTest { Constraint c = new Constraint<>(Constants.REALLYHIGHPERCENTBASALRATE); danaRSPlugin.applyBasalPercentConstraints(c, AAPSMocker.getValidProfile()); - Assert.assertEquals((Integer) 200, c.value()); - Assert.assertEquals("DanaRS: Limiting percent rate to 200% because of pump limit", c.getReasons()); - Assert.assertEquals("DanaRS: Limiting percent rate to 200% because of pump limit", c.getMostLimitedReasons()); + assertEquals((Integer) 200, c.value()); + assertEquals("DanaRS: Limiting percent rate to 200% because of pump limit", c.getReasons()); + assertEquals("DanaRS: Limiting percent rate to 200% because of pump limit", c.getMostLimitedReasons()); } @Before