diff --git a/test/bloc_tests/worldstate_bloc_test.dart b/test/bloc_tests/worldstate_bloc_test.dart index 947d8f217..2d48be04c 100644 --- a/test/bloc_tests/worldstate_bloc_test.dart +++ b/test/bloc_tests/worldstate_bloc_test.dart @@ -5,6 +5,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; import 'package:navis/blocs/bloc.dart'; import 'package:navis/blocs/worldstate/worldstate_events.dart'; +import 'package:navis/services/storage/cache_storage.service.dart'; import 'package:navis/services/storage/persistent_storage.service.dart'; import 'package:wfcd_client/clients.dart'; import 'package:wfcd_client/enums.dart'; @@ -16,16 +17,22 @@ import '../setup_methods.dart'; void main() { final worldstateJson = File('./worldstate.json').readAsStringSync(); final worldstate = Worldstate.fromJson(json.decode(worldstateJson)); + final storage = PersistentStorageService(); + final cache = CacheStorageService(); WorldstateClient api; - PersistentStorageService storage; WorldstateBloc worldstateBloc; setUpAll(() async { await mockSetup(); api = MockWfcdWrapper(); - worldstateBloc = WorldstateBloc(api: api, persistent: storage); + + await storage.startInstance(); + await cache.startInstance(); + + worldstateBloc = + WorldstateBloc(api: api, persistent: storage, cache: cache); }); test('Enusre that Worldstate is Loaded', () async {