Add use question test

This commit is contained in:
Lucas Lima 2020-06-27 22:14:50 -03:00
parent 56fd3ceb51
commit 0b4c68dc95
No known key found for this signature in database
GPG key ID: C5EEF4C30BFBF8D7

View file

@ -258,6 +258,22 @@ class GameControllerTest {
}
}
@Test
fun testSwitchToQuestionWithUseQuestionOff() {
levelFacadeOf(3, 3, 1, 200L).run {
plantMinesExcept(3)
useQuestionMark(false)
with(getArea(7)) {
switchMark()
switchMark()
assertTrue(mark.isNone())
}
field.forEach { assertFalse(it.mark.isQuestion()) }
}
}
@Test
fun testSwitchBackToEmpty() {
levelFacadeOf(3, 3, 1, 200L).run {