// ignore_for_file: no-magic-number import 'package:test/test.dart'; import 'package:x_haven_server/core/commands/amd_reveal_command.dart'; import 'package:x_haven_server/core/state/game_state.dart'; import 'package:x_haven_server/core/service_locator.dart'; import 'test_helpers.dart'; void main() { setUpAll(() async { await setUpGame(); }); group('AMDRevealCommand', () { test('should set revealedCount on the main modifier deck', () { final command = AMDRevealCommand( amount: 2, name: 'Monsters', gameState: getIt(), ); command.execute(); expect(getIt().modifierDeck.revealedCount, 2); checkSaveState(); }); test('should set revealedCount to zero when amount is 0', () { AMDRevealCommand( amount: 3, name: 'Monsters', gameState: getIt(), ).execute(); AMDRevealCommand( amount: 0, name: 'Monsters', gameState: getIt(), ).execute(); expect(getIt().modifierDeck.revealedCount, 0); }); test('describe should include the amount', () { final command = AMDRevealCommand( amount: 3, name: 'Monsters', gameState: getIt(), ); expect(command.describe(), 'Reveal 3 modifier cards'); }); }); }