chore: 플랫폼 설정 및 테스트 업데이트
- Android 광고 권한 추가 - macOS 플러그인 등록 - 테스트 mock 업데이트
This commit is contained in:
@@ -80,7 +80,7 @@ void main() {
|
||||
test('loadAndStart surfaces save load errors', () {
|
||||
fakeAsync((async) {
|
||||
final saveManager = FakeSaveManager()
|
||||
..onLoad = (_) => (const SaveOutcome.failure('boom'), null, false);
|
||||
..onLoad = (_) => (const SaveOutcome.failure('boom'), null, false, null);
|
||||
final controller = buildController(async, saveManager);
|
||||
|
||||
controller.loadAndStart(fileName: 'bad.pqf');
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:asciineverdie/src/core/engine/reward_service.dart';
|
||||
import 'package:asciineverdie/src/core/model/combat_state.dart';
|
||||
import 'package:asciineverdie/src/core/model/combat_stats.dart';
|
||||
import 'package:asciineverdie/src/core/model/game_state.dart';
|
||||
import 'package:asciineverdie/src/core/model/monetization_state.dart';
|
||||
import 'package:asciineverdie/src/core/model/monster_combat_stats.dart';
|
||||
import 'package:asciineverdie/src/core/model/pq_config.dart';
|
||||
import 'package:asciineverdie/src/core/storage/save_manager.dart';
|
||||
@@ -23,7 +24,7 @@ class FakeSaveManager implements SaveManager {
|
||||
final List<GameState> savedStates = [];
|
||||
|
||||
/// 커스텀 로드 동작 설정
|
||||
(SaveOutcome, GameState?, bool) Function(String?)? onLoad;
|
||||
(SaveOutcome, GameState?, bool, MonetizationState?) Function(String?)? onLoad;
|
||||
|
||||
/// 저장 결과 설정 (기본: 성공)
|
||||
SaveOutcome saveOutcome = const SaveOutcome.success();
|
||||
@@ -33,17 +34,20 @@ class FakeSaveManager implements SaveManager {
|
||||
GameState state, {
|
||||
String? fileName,
|
||||
bool cheatsEnabled = false,
|
||||
MonetizationState? monetization,
|
||||
}) async {
|
||||
savedStates.add(state);
|
||||
return saveOutcome;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<(SaveOutcome, GameState?, bool)> loadState({String? fileName}) async {
|
||||
Future<(SaveOutcome, GameState?, bool, MonetizationState?)> loadState({
|
||||
String? fileName,
|
||||
}) async {
|
||||
if (onLoad != null) {
|
||||
return onLoad!(fileName);
|
||||
}
|
||||
return (const SaveOutcome.success(), null, false);
|
||||
return (const SaveOutcome.success(), null, false, null);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user