From 4bbd3128919d4b0955aa266479750f1be8b5417d Mon Sep 17 00:00:00 2001 From: Philoul Date: Tue, 23 Nov 2021 00:14:22 +0100 Subject: [PATCH] Simplify Mock --- .../java/info/nightscout/androidaps/queue/QueueThreadTest.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/test/java/info/nightscout/androidaps/queue/QueueThreadTest.kt b/app/src/test/java/info/nightscout/androidaps/queue/QueueThreadTest.kt index d2a2d3fac5..6f45105592 100644 --- a/app/src/test/java/info/nightscout/androidaps/queue/QueueThreadTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/queue/QueueThreadTest.kt @@ -79,8 +79,7 @@ class QueueThreadTest : TestBaseWithProfile() { val percentageConstraint = Constraint(0) Mockito.`when`(constraintChecker.applyBasalPercentConstraints(anyObject(), anyObject())) .thenReturn(percentageConstraint) - Mockito.`when`(rh.gs(ArgumentMatchers.eq(R.string.temp_basal_absolute), ArgumentMatchers.anyDouble(), ArgumentMatchers.anyInt())).thenReturn("TEMP BASAL %1\$.2f U/h %2\$d min").thenAnswer { - i: InvocationOnMock -> "TEMP BASAL " + i.arguments[1] + " U/h " + i.arguments[2] + "min" } + Mockito.`when`(rh.gs(ArgumentMatchers.eq(R.string.temp_basal_absolute), ArgumentMatchers.anyDouble(), ArgumentMatchers.anyInt())).thenReturn("TEMP BASAL %1\$.2f U/h %2\$d min") sut = QueueThread(commandQueue, context, aapsLogger, rxBus, activePlugin, rh, sp) }