def test_when_valid_parameters_and_none_game_and_none_user_sudoku_then_an_exception_should_be_trown(self): cmd = StartCommand(None) try: cmd.execute() self.fail("Expected InvalidCmdParametersException was not raised.") except InvalidCmdParametersException: pass
def test_when_valid_parameters_none_game_and_there_is_a_valid_user_sudoku_then_an_exception_should_be_trown_saying_there_is_not_game(self): dict = {} cmd = StartCommand(dict) try: cmd.execute() self.fail("Expected InvalidCmdParametersException was not raised.") except InvalidCmdParametersException: pass
def test_when_valid_parameters_and_valid_game_and_a_valid_user_sudoku_then_should_the_game_be_started(self): user_sudoku = SudokuBoard(3) game = Game() game.started = False game.user_sudoku = user_sudoku cmd = StartCommand(None) cmd.set_game(game) cmd.execute() self.assertTrue(game.started)