def test_minesweeper_input_help(self): i_s = InputSystem() result = i_s.handle_minesweeper_input("help") self.assertEqual(True, "find all the mines" in result)
def test_minesweeper_input_clear(self): in_sys = InputSystem() in_sys.handle_minesweeper_input("4,3") self.assertEqual([[4, 3]], in_sys.minesweeper_game.game_history) self.assertEqual([[4, 3]], in_sys.minesweeper_game.game_history)
def test_minesweeper_input_invalid(self): in_sys = InputSystem() result = in_sys.handle_minesweeper_input("Mines") self.assertEqual(True, "Invalid input" in result) result = in_sys.handle_minesweeper_input("1,2,3") self.assertEqual(True, "Invalid input" in result)
def test_minesweeper_input_reset(self): i_s = InputSystem() i_s.handle_minesweeper_input("4,3") result = i_s.handle_minesweeper_input("Reset") self.assertEqual(True, "Game reset" in result)