From 05db583a082535f13d9b42990829db1758ee53b4 Mon Sep 17 00:00:00 2001 From: Sam Spycher Date: Mon, 19 Oct 2020 14:23:30 +0200 Subject: [PATCH] match test string with translation --- .../smsCommunicator/SmsCommunicatorPluginTest.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/general/smsCommunicator/SmsCommunicatorPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/general/smsCommunicator/SmsCommunicatorPluginTest.kt index 8f1646888e..42d353f2cf 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/general/smsCommunicator/SmsCommunicatorPluginTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/plugins/general/smsCommunicator/SmsCommunicatorPluginTest.kt @@ -190,7 +190,7 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() { `when`(resourceHelper.gs(R.string.smscommunicator_loopisdisabled)).thenReturn("Loop is disabled") `when`(resourceHelper.gs(R.string.smscommunicator_loopisenabled)).thenReturn("Loop is enabled") `when`(resourceHelper.gs(R.string.wrongformat)).thenReturn("Wrong format") - `when`(resourceHelper.gs(eq(R.string.wrongTbrDuration), any())).thenAnswer({ i: InvocationOnMock -> "TBR duration must a multiple of " + i.getArguments()[1] + " minutes and greater than 0."}) + `when`(resourceHelper.gs(eq(R.string.wrongTbrDuration), any())).thenAnswer({ i: InvocationOnMock -> "TBR duration must be a multiple of " + i.getArguments()[1] + " minutes and greater than 0."}) `when`(resourceHelper.gs(R.string.smscommunicator_loophasbeendisabled)).thenReturn("Loop has been disabled") `when`(resourceHelper.gs(R.string.smscommunicator_loophasbeenenabled)).thenReturn("Loop has been enabled") `when`(resourceHelper.gs(R.string.smscommunicator_tempbasalcanceled)).thenReturn("Temp basal canceled") @@ -782,14 +782,14 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() { sms = Sms("1234", "BASAL 10% 0") smsCommunicatorPlugin.processSms(sms) Assert.assertEquals("BASAL 10% 0", smsCommunicatorPlugin.messages[0].text) - Assert.assertEquals("TBR duration must a multiple of 30 minutes and greater than 0.", smsCommunicatorPlugin.messages[1].text) + Assert.assertEquals("TBR duration must be a multiple of 30 minutes and greater than 0.", smsCommunicatorPlugin.messages[1].text) //BASAL 20% 20 smsCommunicatorPlugin.messages = ArrayList() sms = Sms("1234", "BASAL 20% 20") smsCommunicatorPlugin.processSms(sms) Assert.assertEquals("BASAL 20% 20", smsCommunicatorPlugin.messages[0].text) - Assert.assertEquals("TBR duration must a multiple of 30 minutes and greater than 0.", smsCommunicatorPlugin.messages[1].text) + Assert.assertEquals("TBR duration must be a multiple of 30 minutes and greater than 0.", smsCommunicatorPlugin.messages[1].text) `when`(constraintChecker.applyBasalPercentConstraints(anyObject(), anyObject())).thenReturn(Constraint(20)) //BASAL 20% 30 @@ -815,7 +815,7 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() { sms = Sms("1234", "BASAL 1 0") smsCommunicatorPlugin.processSms(sms) Assert.assertEquals("BASAL 1 0", smsCommunicatorPlugin.messages[0].text) - Assert.assertEquals("TBR duration must a multiple of 30 minutes and greater than 0.", smsCommunicatorPlugin.messages[1].text) + Assert.assertEquals("TBR duration must be a multiple of 30 minutes and greater than 0.", smsCommunicatorPlugin.messages[1].text) `when`(constraintChecker.applyBasalConstraints(anyObject(), anyObject())).thenReturn(Constraint(1.0)) //BASAL 1 20 @@ -823,7 +823,7 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() { sms = Sms("1234", "BASAL 1 20") smsCommunicatorPlugin.processSms(sms) Assert.assertEquals("BASAL 1 20", smsCommunicatorPlugin.messages[0].text) - Assert.assertEquals("TBR duration must a multiple of 30 minutes and greater than 0.", smsCommunicatorPlugin.messages[1].text) + Assert.assertEquals("TBR duration must be a multiple of 30 minutes and greater than 0.", smsCommunicatorPlugin.messages[1].text) `when`(constraintChecker.applyBasalConstraints(anyObject(), anyObject())).thenReturn(Constraint(1.0)) //BASAL 1 30