import 'package:test/test.dart'; import 'package:x_haven_server/core/commands/amd_cassandra_special_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('AMDCassandraSpecialCommand', () { test('should set cassandraSpecial to true on main deck', () { AMDCassandraSpecialCommand( '', true, gameState: getIt(), ).execute(); expect(getIt().modifierDeck.cassandraSpecial, isTrue); checkSaveState(); }); test('should set cassandraSpecial to false on main deck', () { AMDCassandraSpecialCommand( '', true, gameState: getIt(), ).execute(); AMDCassandraSpecialCommand( '', false, gameState: getIt(), ).execute(); expect(getIt().modifierDeck.cassandraSpecial, isFalse); checkSaveState(); }); test('describe when on returns leave-revealed string', () { final command = AMDCassandraSpecialCommand( 'Blinkblade', true, gameState: getIt(), ); expect( command.describe(), 'Leave revealed cards on top of Blinkblade deck', ); }); test('describe when off returns turned-off string', () { final command = AMDCassandraSpecialCommand( 'Blinkblade', false, gameState: getIt(), ); expect( command.describe(), 'Cassandra Special turned off for Blinkblade deck', ); }); }); }