import 'package:test/test.dart'; import 'package:x_haven_server/core/commands/set_campaign_command.dart'; import 'package:x_haven_server/core/service_locator.dart'; import 'package:x_haven_server/core/state/game_state.dart'; import 'test_helpers.dart'; void main() { setUpAll(() async { await setUpGame(); }); group('SetCampaignCommand', () { test('should set campaign to Frosthaven', () { final command = SetCampaignCommand('Frosthaven'); command.execute(); expect(getIt().currentCampaign, 'Frosthaven'); checkSaveState(); }); test('should set campaign to Jaws of the Lion', () { final command = SetCampaignCommand('Jaws of the Lion'); command.execute(); expect(getIt().currentCampaign, 'Jaws of the Lion'); checkSaveState(); }); test('describe should return correct string', () { final command = SetCampaignCommand('Frosthaven'); expect(command.describe(), 'Set Frosthaven campaign'); }); }); }