Skip to content

Commit

Permalink
fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
SlayerOrnstein committed Mar 13, 2020
1 parent 3bb7a97 commit 9f07630
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/bloc_tests/worldstate_bloc_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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 {
Expand Down

0 comments on commit 9f07630

Please sign in to comment.