Fix tests

This commit is contained in:
Lucas Lima 2020-08-24 21:42:34 -03:00
parent b3f0590466
commit 56e1e61e34
2 changed files with 10 additions and 2 deletions

View file

@ -45,10 +45,12 @@ class MockPreferencesRepository : IPreferencesRepository {
override fun disableRequestRating() { }
override fun unlockExtras() { }
override fun setLockExtras(lock: Boolean, keepShowingSupportButton: Boolean) { }
override fun areExtrasUnlocked(): Boolean = false
override fun showSupport(): Boolean = true
override fun useFlagAssistant(): Boolean = false
override fun useHapticFeedback(): Boolean = true

View file

@ -102,7 +102,13 @@ class MinefieldHandlerTest {
handler.openAt(5, false, openNeighbors = false)
handler.highlightAt(5)
assertEquals(8, handler.result().count { it.highlighted })
assertEquals(listOf(0, 1, 2, 4, 6, 8, 9, 10), handler.result().filter { it.highlighted }.map { it.id }.toList())
assertEquals(
listOf(0, 1, 2, 4, 6, 8, 9, 10),
handler.result()
.filter { it.highlighted }
.map { it.id }
.toList()
)
}
}