From 0b4c68dc95cc54a1cb861ee868b9591e4125e6d7 Mon Sep 17 00:00:00 2001 From: Lucas Lima Date: Sat, 27 Jun 2020 22:14:50 -0300 Subject: [PATCH] Add use question test --- .../antimine/common/level/GameControllerTest.kt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/common/src/test/java/dev/lucasnlm/antimine/common/level/GameControllerTest.kt b/common/src/test/java/dev/lucasnlm/antimine/common/level/GameControllerTest.kt index d9ec5b8e..1a5e8cf0 100644 --- a/common/src/test/java/dev/lucasnlm/antimine/common/level/GameControllerTest.kt +++ b/common/src/test/java/dev/lucasnlm/antimine/common/level/GameControllerTest.kt @@ -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 {