Пример #1
0
 def test_a_game_should_be_imported(self):
     settings_manager = SettingsManager('mySettings.xml')
     settings_manager.load()
     game = Game()
     game.set_settings_manager(settings_manager)
     game.start_game_timer()
     import_command = ImportCommand(self.valid_params)
     import_command.set_game(game)
     import_command.execute()
     self.assertEqual((game.initial_sudoku.to_dictionary())['A1'], '.')
Пример #2
0
 def test_an_InvalidCmdParametersException_should_be_raised_if_game_is_None(self):
     with self.assertRaises(InvalidCmdParametersException):
         cmd = ImportCommand(self.valid_params)
         cmd.execute()