Skip to content

Commit eb8203c

Browse files
committed
change test
1 parent 1da8106 commit eb8203c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ android {
126126
targetSdkVersion 28
127127
multiDexEnabled true
128128
versionCode 1500
129-
version "2.7.0"
129+
version "2.7.0-dev"
130130
buildConfigField "String", "VERSION", '"' + version + '"'
131131
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
132132
buildConfigField "String", "REMOTE", '"' + generateGitRemote() + '"'

app/src/test/java/info/nightscout/androidaps/interfaces/ConstraintsCheckerTest.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,11 @@ class ConstraintsCheckerTest : TestBaseWithProfile() {
154154
`when`(sp.getString(R.string.key_aps_mode, "open")).thenReturn("closed")
155155
objectivesPlugin.objectives[ObjectivesPlugin.MAXIOB_ZERO_CL_OBJECTIVE].startedOn = 0
156156
var c: Constraint<Boolean> = constraintChecker.isClosedLoopAllowed()
157-
Assert.assertEquals(2, c.reasonList.size) // Safety & Objectives
157+
Assert.assertTrue(c.reasonList[0].toString().contains("Closed loop is disabled")) // Safety & Objectives
158158
Assert.assertEquals(false, c.value())
159159
`when`(sp.getString(R.string.key_aps_mode, "open")).thenReturn("open")
160160
c = constraintChecker.isClosedLoopAllowed()
161+
Assert.assertTrue(c.reasonList[0].toString().contains("Closed loop mode disabled in preferences")) // Safety & Objectives
161162
Assert.assertEquals(3, c.reasonList.size) // 2x Safety & Objectives
162163
Assert.assertEquals(false, c.value())
163164
}

0 commit comments

Comments
 (0)