diff --git a/test/core/engine/progress_loop_test.dart b/test/core/engine/progress_loop_test.dart index 6082fdd..f937383 100644 --- a/test/core/engine/progress_loop_test.dart +++ b/test/core/engine/progress_loop_test.dart @@ -13,14 +13,18 @@ class _FakeSaveManager implements SaveManager { final List savedStates = []; @override - Future saveState(GameState state, {String? fileName}) async { + Future saveState( + GameState state, { + String? fileName, + bool cheatsEnabled = false, + }) async { savedStates.add(state); return const SaveOutcome.success(); } @override - Future<(SaveOutcome, GameState?)> loadState({String? fileName}) async { - return (const SaveOutcome.success(), null); + Future<(SaveOutcome, GameState?, bool)> loadState({String? fileName}) async { + return (const SaveOutcome.success(), null, false); } @override diff --git a/test/features/game_play_screen_test.dart b/test/features/game_play_screen_test.dart index 46034bb..ba8a1cf 100644 --- a/test/features/game_play_screen_test.dart +++ b/test/features/game_play_screen_test.dart @@ -23,13 +23,17 @@ Widget _buildTestApp(Widget child) { class _FakeSaveManager implements SaveManager { @override - Future saveState(GameState state, {String? fileName}) async { + Future saveState( + GameState state, { + String? fileName, + bool cheatsEnabled = false, + }) async { return const SaveOutcome.success(); } @override - Future<(SaveOutcome, GameState?)> loadState({String? fileName}) async { - return (const SaveOutcome.success(), null); + Future<(SaveOutcome, GameState?, bool)> loadState({String? fileName}) async { + return (const SaveOutcome.success(), null, false); } @override diff --git a/test/features/game_session_controller_test.dart b/test/features/game_session_controller_test.dart index 39b8c99..69df17c 100644 --- a/test/features/game_session_controller_test.dart +++ b/test/features/game_session_controller_test.dart @@ -12,21 +12,25 @@ import 'package:flutter_test/flutter_test.dart'; class FakeSaveManager implements SaveManager { final List savedStates = []; - (SaveOutcome, GameState?) Function(String?)? onLoad; + (SaveOutcome, GameState?, bool) Function(String?)? onLoad; SaveOutcome saveOutcome = const SaveOutcome.success(); @override - Future saveState(GameState state, {String? fileName}) async { + Future saveState( + GameState state, { + String? fileName, + bool cheatsEnabled = false, + }) async { savedStates.add(state); return saveOutcome; } @override - Future<(SaveOutcome, GameState?)> loadState({String? fileName}) async { + Future<(SaveOutcome, GameState?, bool)> loadState({String? fileName}) async { if (onLoad != null) { return onLoad!(fileName); } - return (const SaveOutcome.success(), null); + return (const SaveOutcome.success(), null, false); } @override @@ -122,7 +126,7 @@ void main() { test('loadAndStart surfaces save load errors', () { fakeAsync((async) { final saveManager = FakeSaveManager() - ..onLoad = (_) => (const SaveOutcome.failure('boom'), null); + ..onLoad = (_) => (const SaveOutcome.failure('boom'), null, false); final controller = buildController(async, saveManager); controller.loadAndStart(fileName: 'bad.pqf');