Skip to content

Commit

Permalink
change test
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosKozak committed Sep 24, 2020
1 parent 1da8106 commit eb8203c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ android {
targetSdkVersion 28
multiDexEnabled true
versionCode 1500
version "2.7.0"
version "2.7.0-dev"
buildConfigField "String", "VERSION", '"' + version + '"'
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
buildConfigField "String", "REMOTE", '"' + generateGitRemote() + '"'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,11 @@ class ConstraintsCheckerTest : TestBaseWithProfile() {
`when`(sp.getString(R.string.key_aps_mode, "open")).thenReturn("closed")
objectivesPlugin.objectives[ObjectivesPlugin.MAXIOB_ZERO_CL_OBJECTIVE].startedOn = 0
var c: Constraint<Boolean> = constraintChecker.isClosedLoopAllowed()
Assert.assertEquals(2, c.reasonList.size) // Safety & Objectives
Assert.assertTrue(c.reasonList[0].toString().contains("Closed loop is disabled")) // Safety & Objectives
Assert.assertEquals(false, c.value())
`when`(sp.getString(R.string.key_aps_mode, "open")).thenReturn("open")
c = constraintChecker.isClosedLoopAllowed()
Assert.assertTrue(c.reasonList[0].toString().contains("Closed loop mode disabled in preferences")) // Safety & Objectives
Assert.assertEquals(3, c.reasonList.size) // 2x Safety & Objectives
Assert.assertEquals(false, c.value())
}
Expand Down

0 comments on commit eb8203c

Please sign in to comment.