diff --git a/lib/globals.dart b/lib/globals.dart index 3cdf823..43ebe5e 100644 --- a/lib/globals.dart +++ b/lib/globals.dart @@ -1,10 +1,8 @@ library app.globals; -import 'package:smoke_cess_app/mock/db_mock.dart'; import 'package:smoke_cess_app/services/database_service.dart'; -DatabaseService databaseService = DatabaseMock(); -// DatabaseService databaseService = DatabaseService.instance; +DatabaseService databaseService = DatabaseService.instance; // set this to read settings from local json file instead of scanning a qr code bool useLocalConfig = false; diff --git a/lib/mock/db_mock.dart b/test/mock/db_mock.dart similarity index 100% rename from lib/mock/db_mock.dart rename to test/mock/db_mock.dart diff --git a/lib/mock/settings_mock.dart b/test/mock/settings_mock.dart similarity index 74% rename from lib/mock/settings_mock.dart rename to test/mock/settings_mock.dart index 337251c..1f0be5d 100644 --- a/lib/mock/settings_mock.dart +++ b/test/mock/settings_mock.dart @@ -1,3 +1,5 @@ +import 'package:shared_preferences/shared_preferences.dart'; + Map mockSettings = { "group": 3, "HITT_time": 35, @@ -15,3 +17,6 @@ Map mockSettings = { }, "startedAt": DateTime.now().toIso8601String(), }; + +void mockSharedPreferences() => + SharedPreferences.setMockInitialValues(mockSettings);