settings mock and database mock in test folder
parent
75b638b843
commit
716db5240f
|
@ -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;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
Map<String, Object> mockSettings = {
|
||||
"group": 3,
|
||||
"HITT_time": 35,
|
||||
|
@ -15,3 +17,6 @@ Map<String, Object> mockSettings = {
|
|||
},
|
||||
"startedAt": DateTime.now().toIso8601String(),
|
||||
};
|
||||
|
||||
void mockSharedPreferences() =>
|
||||
SharedPreferences.setMockInitialValues(mockSettings);
|
Loading…
Reference in New Issue